Re: Python problem

2011-03-28 Thread John Parker
d(average) #print averages for i in range (0, len(names)): print names[i], "score: ", averages[i] On 3/28/11 12:18 PM, "Rhodri James" wrote: > On Mon, 28 Mar 2011 22:38:29 +0100, John Parker wrote: > >> infile = open("scores.txt", &quo

Re: Python problem

2011-03-28 Thread John Parker
, "Ethan Furman" wrote: > John Parker wrote: >> I have written the following code so far but get an error. >> >> infile = open("scores.txt", "r") >> lines = infile.readlines() >> infile.close() >> tokens = lines.split(",&

Python problem

2011-03-28 Thread John Parker
Hi All, I'm trying to figure out a problem in which I have a file named scores.txt that contains the following information. Jane Doe,87,92,97,33 John Doe,78,91,84,25 Bill Gates,91,88,89,56 Bruce Perens,88,92,84,99 I'm wanting to read the file and create two lists: names and scores. I also wa