basic python questions
ptmcg at austin.rr._bogus_.com
Sat Nov 18 12:29:01 CET 2006
<nateastle at gmail.com> wrote in message
news:1163829271.660193.70450 at j44g2000cwa.googlegroups.com...
>I have a simple assignment for school but am unsure where to go. The
> assignment is to read in a text file, split out the words and say which
> line each word appears in alphabetical order. I have the basic outline
> of the program done which is:
And in general, this is one of the best "can anyone help me with my
homework?" posts I've ever seen.
A. You told us up front that it was your homework.
B. You made an honest stab at the solution before posting, and posted the
C. You ended with some specific questions on things that didn't work or that
you wanted to improve.
Your current program looks like at least A- material. Add use of sorted and
enumerate, and handle that exception a little better, and you're getting
into A+ territory.
Out of curiosity, what school are you attending that is teaching Python, and
under what course of study?
More information about the Python-list