Newby: how to transform text into lines of text

Marc 'BlackJack' Rintsch bj_666 at gmx.net
Mon Jan 26 09:51:33 EST 2009


On Mon, 26 Jan 2009 12:22:18 +0000, Sion Arrowsmith wrote:

> content = a.readlines()
> 
> (Just because we can now write "for line in file" doesn't mean that
> readlines() is *totally* redundant.)

But ``content = list(a)`` is shorter.  :-)

Ciao,
	Marc 'BlackJack' Rintsch



More information about the Python-list mailing list