looping through a file
bdesth.nospam at removeme.free.fr
Fri Jul 25 22:24:50 CEST 2003
> Psybar Phreak wrote:
>> hi all - ive just started with python (after having done java and c)
>> and am
>> having a little bit of trouble with the script. Im using as a login
>> There's a users.dat file in the format
>> ... etc
>> at the moment - the code i work, only checks the first and second
>> lines (ie.
>> details of user1). but it appears that python doesn't have a do...
>> until loop.
No, but there are better ways to do it in Python :
thefile = file(filename)
for line in thefile.readlines():
More information about the Python-list