As you well know JSON is a standard that allows to pass data from one programming language to another so they could consume them into their objects
an object that can be iterated is pj variable
import json
import urllib.request
connection = urllib.request.urlopen('http://py4e-data.dr-chuck.net/comments_42.json')
js = connection.read()
pj = json.loads(js)#stores dicts, python objects, iterate them
x = json.dumps(pj,indent = 2)#json here, remember is just a string, cant access them using x['key']
[print(z['count']) for z in pj['comments']]
[97, 97, 90, 90, 88, 87, 87, 80, 79, 79, 78, 76, 76, 72, ...]
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…