title: how to solve TypeError: list indices must be integers or slices, not str in python
body: <p><strong>The Situation</strong></p>
  <p>I am trying to access values within a json string but receive the error:</p>
  <blockquote>
  <p>TypeError: list indices must be integers or slices, not str</p>
  </blockquote>
  <p><strong>The JSON</strong></p>
  <pre><code>        j={
          &quot;type&quot;: &quot;FeatureCollection&quot;,
          &quot;features&quot;: [
              {
                  &quot;type&quot;: &quot;Feature&quot;,
                  &quot;geometry&quot;: {
                      &quot;type&quot;: &quot;Point&quot;,
                      &quot;coordinates&quot;: [
                          2.44775,
                          48.925778
                      ]
                  },
                  &quot;properties&quot;: {
                      &quot;country_code&quot;: &quot;fr&quot;,
                      &quot;housenumber&quot;: &quot;15&quot;,
                      &quot;street&quot;: &quot;Rue Leon Bernard&quot;,
                      &quot;distance&quot;: 16.948223707815888,
                      &quot;country&quot;: &quot;France&quot;,
                      &quot;county&quot;: &quot;Seine-Saint-Denis&quot;,
                      &quot;datasource&quot;: {
                          &quot;sourcename&quot;: &quot;openaddresses&quot;,
                          &quot;attribution&quot;: &quot;© OpenAddresses contributors&quot;,
                          &quot;license&quot;: &quot;BSD-3-Clause License&quot;
                      },
                      &quot;postcode&quot;: &quot;93700&quot;,
                      &quot;state&quot;: &quot;Ile-of-France&quot;,
                      &quot;district&quot;: &quot;Drancy&quot;,
                      &quot;city&quot;: &quot;Drancy&quot;,
                      &quot;lon&quot;: 2.44775,
                      &quot;lat&quot;: 48.925778,
                      &quot;result_type&quot;: &quot;building&quot;,
                      &quot;formatted&quot;: &quot;15 Rue Leon Bernard, 93700 Drancy, France&quot;,
                      &quot;address_line1&quot;: &quot;15 Rue Leon Bernard&quot;,
                      &quot;address_line2&quot;: &quot;93700 Drancy, France&quot;,
                  }
              }
          ]
      }
  </code></pre>
  <p><strong>The Objective</strong></p>
  <p>I need to get the value of country_code and country i have tried</p>
  <pre class="lang-json prettyprint-override"><code>j['features']['properties'][0]` 
  </code></pre>
  <p><strong>The Question:</strong></p>
  <p>How can i get the value of these two fields in python ?</p>