readline in while loop

Edvard Majakari edvard+web at majakari.net
Fri May 23 08:38:48 EDT 2003


On Fri, 23 May 2003, antonmuhin at sendmail.ru wrote:

> f = file("test.txt", 'r')
> for line in f:
> 	print line
> f.close()

Looks neat. I try to avoid Perl vs. Python flame fest, but are some
constructs in Python context-sensitive (like in Perl), or is this some
handy use of iterators in class file?

-- 
# Edvard Majakari		Software Engineer
# PGP PUBLIC KEY available    	Soli Deo Gloria!

$_ = '456476617264204d616a616b6172692c20612043687269737469616e20'; print
join('',map{chr hex}(split/(\w{2})/)),uc substr(crypt(60281449,'es'),2,4),"\n";





More information about the Python-list mailing list