X-Received: by 10.182.99.225 with SMTP id et1mr1222445obb.36.1447125670789; Mon, 09 Nov 2015 19:21:10 -0800 (PST) X-Received: by 10.50.57.84 with SMTP id g20mr41668igq.3.1447125670767; Mon, 09 Nov 2015 19:21:10 -0800 (PST) Path: csiph.com!xmission!news.glorb.com!i2no2063441igv.0!news-out.google.com!l1ni1675igd.0!nntp.google.com!i2no2063436igv.0!postnews.google.com!glegroupsg2000goo.googlegroups.com!not-for-mail Newsgroups: comp.lang.python Date: Mon, 9 Nov 2015 19:21:10 -0800 (PST) In-Reply-To: <1d1610e5-d401-48f2-b5ee-3af91b9e485f@googlegroups.com> Complaints-To: groups-abuse@google.com Injection-Info: glegroupsg2000goo.googlegroups.com; posting-host=24.156.194.39; posting-account=2kx5rQoAAADfvhMF5mfrfeFIzRuNA8Wb NNTP-Posting-Host: 24.156.194.39 References: <1d1610e5-d401-48f2-b5ee-3af91b9e485f@googlegroups.com> User-Agent: G2/1.0 MIME-Version: 1.0 Message-ID: Subject: Re: Extracting and summing student scores from a JSON file using Python 2.7.10 From: Bernie Lazlo Injection-Date: Tue, 10 Nov 2015 03:21:10 +0000 Content-Type: text/plain; charset=ISO-8859-1 Xref: csiph.com comp.lang.python:98571 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! :-)