new linereading standard?
robin at jessikat.demon.co.uk
Tue Apr 25 03:02:29 EDT 2000
In article <390510C9.A744D22E at yahoo.com>, Al-Amerrho H. Amerin
<al_amerin at yahoo.com> writes
>Pete Shinners wrote:
>> pete at visionart.com
>A beginner myself, I would write it like this:
>inputlines = open('myfile.txt').readlines()
>for line in inputlines:
> print line
>Instead of the 'while 1: ....break' thingy.
am I wrong for writing
for line in open('myfile.txt').readlines():
More information about the Python-list