Extracting and summing student scores from a JSON file using Python 2.7.10

Bernie Lazlo bjlazlo at gmail.com
Mon Nov 9 22:21:10 EST 2015


On Monday, 9 November 2015 18:53:06 UTC-5, Bernie Lazlo  wrote:
> This should be a simple problem but I have wasted hours on it. Any help would be appreciated. [I have taken my code back to almost the very beginning.]
> ========================
> The student scores need to be summed.
> ========================
> import json
> import urllib
> url = "http://www.wickson.net/geography_assignment.json"
> response = urllib.urlopen(url)
> data = json.loads(response.read())
> lst1 = list(data.items())
> print lst1
==========================

Many thanks, MRAB!  :-)



More information about the Python-list mailing list