Created
November 5, 2015 10:22
-
-
Save salayhin/7966fd26be7ac3e29d10 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import json | |
import urllib | |
url = 'http://pr4e.dr-chuck.com/tsugi/mod/python-data/data/comments_168215.json' | |
input = urllib.urlopen(url).read() | |
info = json.loads(input) | |
#print info | |
sum = 0 | |
for item in info['comments']: | |
sum = sum + int(item['count']) | |
print sum |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment