Help with report
Grant Edwards
grante at visi.com
Mon Jul 11 18:24:11 EDT 2005
On 2005-07-11, ChrisH <secun at yahoo.com> wrote:
> I have some data in the following format:
>
> Fred Flintstone,445553454,47634565
> Wilma Flintstone,74857346,27576847
> Barney Rubble,73487346,27576435
>
> I need to convert this data into a report with the user's name and
> difference between the 2 numbers.
>
> Can someone recommend a good way to do this?
>
> BTW, it would be best if I can have it up and running by tomorrow.
You really oughtn't put off homework assignments until the last
minute. Especially if you don't know how to do them.
> Also, html would be the preferred format, but not required.
>
> Any help would be greatly appreciated!!
Hints:
The string object's "split" method: http://docs.python.org/lib/string-methods.html
for line in file('inputfile.txt','r')
the built-in int()
the string formatting operator "%": http://docs.python.org/lib/typesseq-strings.html
--
Grant Edwards grante Yow! All right, you
at degenerates! I want this
visi.com place evacuated in 20
seconds!
More information about the Python-list
mailing list