title: getting specific info from openweathermap in python 2.7
body: <p>I am trying to create a python program (as a university exercise) that will get coordinates from the user and print certain messages to the user eg:
  if it rains at the certain region it will print "I am singing the rain"</p>
  
  <pre><code>import json,urllib2
  
  
  while True:
      x=input("Give the longitude:")
      if x&lt;=180 and x&gt;=-180:
          x=str(x)
          break
  
  while True:
      y=input("Give the latitude:")
      if y&lt;=90 and y&gt;=-90:
          y=str(y)
          break
  url="http://api.openweathermap.org/data/2.5/weather?lat="+y+"&amp;lon="+x+"&amp;appid=01e7a487b0c262921260c09b84bdb456"
  weatherbot=urllib2.urlopen(url)
  weatherinfo=weatherbot.read()
  </code></pre>
  
  <p>So far I can get the info from Openweathermap,but if I try to get specific info like that:</p>
  
  <pre><code>currentweather=weatherinfo["weather"]["main"]
  </code></pre>
  
  <p>It gives me this error message:</p>
  
  <pre><code>TypeError:string indices must be integer, not str
  </code></pre>
  
  <p>Despite when I do: </p>
  
  <pre><code>print weatherinfo
  </code></pre>
  
  <p>it appears to be a dictionary.</p>
  
  <p>Can someone explain to me what I am doing wrong?</p>
  
  <p>PS:Don't suggest installing extra libraries in Python,since I am not 100% sure our professor will be using said libraries to check our code.</p>