so how would I check to see if the student number entered by the user
matches one of the student numbers in the file and then display that
students info?

On 4/19/09, R. Alan Monroe <amon...@columbus.rr.com> wrote:
>
>> gradesfile = open("grades.dat", "r
>> for lines in gradesfile:
>> [snip]
>> That's what I have so far but I have a feeling I shouldn't use a for
>> loop.
>
> Actually a for loop seems like the right tool for this job, assuming
> you really _do_ want to process every line in the file.
>
> Alan
>
> _______________________________________________
> Tutor maillist  -  Tutor@python.org
> http://mail.python.org/mailman/listinfo/tutor
>
_______________________________________________
Tutor maillist  -  Tutor@python.org
http://mail.python.org/mailman/listinfo/tutor

Reply via email to