I started learning to code recently, and I had a query about some for loop syntax in python. I've been having a look at the NPR API module on codecademy (which, I realize, is not a great environment for learning anything) and the way a for loop is presented has me confused. The part in question:
from urllib2 import urlopen
from json import load
url = "http://api.npr.org/query?apiKey="
key = "API_KEY"
url += key
url += "&numResults=3&format=json&id="
npr_id = raw_input("Which NPR ID do you want to query?")
url += npr_id
print url
response = urlopen(url)
json_obj = load(response)
for story in json_obj["list"]["story"]:
print story["title"]["$text"]
I'm confused about the
for story in json_obj["list"]["story"]:
print story["title"]["$text"]
lines. Is it some kind of nested list?