title: KeyError: 0 when trying to get data from JSON
body: <p>I am new to python. I just started to work on a weather API project using openweathermap API.Can anyone explain where i am going wrong? How to retrieve "description" from "weather" and why does it throw keyerror?</p>
  
  <p>My code to retrieve "description" from the JSON response:</p>
  
  <pre><code>   import requests 
     import json from pprint 
     import pprint
  
     city_name= input("Enter the City name") 
     complete_url="https://samples.openweathermap.org/data/2.5/weather?q={},uk&amp;appid=b6907d289e10d714a6e88b30761fae22"
      +format(city_name) 
  
  response=requests.get(complete_url)
  
   data=response.json() 
  
  pprint(response.status_code) 
  
  temprature=data['main']['temp'] 
  
  windspeed=data['wind']['speed'] 
  </code></pre>
  
  <p>description=data['weather'][0]['description']</p>
  
  <pre><code>print('temprature: {}',format(temprature)) 
  
  print('windspeed:{}',format(windspeed))
  print('Description:{}',format(description))
  </code></pre>
  
  <p>My output is </p>
  
  <blockquote>
    <p>Enter the City name seattle
    200
    Traceback (most recent call last):
      File "/Users/suprajaraman/PycharmProjects/learnPython/venv/weather.py", line 15, in 
    description=data['weather'][0][description] NameError: name 'description' is not defined</p>
  </blockquote>
  
  <p>JSON Response</p>
  
  <pre><code>{
  "coord": {
  "lon": -0.13,
  "lat": 51.51
  },
  "weather": [
  {
  "id": 300,
  "main": "Drizzle",
  "description": "light intensity drizzle",
  "icon": "09d"
  }
  ],
  "base": "stations",
  "main": {
  "temp": 280.32,
  "pressure": 1012,
  "humidity": 81,
  "temp_min": 279.15,
  "temp_max": 281.15
  },
  "visibility": 10000,
  "wind": {
  "speed": 4.1,
  "deg": 80
  },
  "clouds": {
  "all": 90
  },
  "dt": 1485789600,
  "sys": {
  "type": 1,
  "id": 5091,
  "message": 0.0103,
  "country": "GB",
  "sunrise": 1485762037,
  "sunset": 1485794875
  },
  "id": 2643743,
  "name": "London",
  "cod": 200
  }
  </code></pre>