I have a problem with this json file : Zips.json! .
I Didnt find a way to count the number of postal codes in each state. I tried many ways such as this :
file=open("C:\Users\Alex\Downloads/zips.json","r")
lines=json.loads(file.readline())
number=0
states=lines["state"]
for line in file:
lines=json.loads(line)
if lines ["state"]==states:
number=number+1
else:
print u"states:",states, u"Number of codes: ",number
states=lines["state"]