looping through a file

Heiko Wundram heikowu at ceosg.de
Sat Jul 26 16:38:42 EDT 2003


On Fri, 2003-07-25 at 22:24, Bruno Desthuilliers wrote:
> for line in thefile.readlines():
>      doWhatEverWithTheLine()

Or, if you're on a sufficiently new Python:

for line in thefile:
	doWhateverWithTheLine()







More information about the Python-list mailing list