perl chomp equivalent in python?

François Pinard pinard at iro.umontreal.ca
Wed Mar 8 19:51:43 CET 2000


Fred Gansevles <gansevle at cs.utwente.nl> writes:

>     for line in string.split (open (file).read(), '\n'):
>         ....

It looks like a good idea.  You usually have an empty line at end?

-- 
François Pinard   http://www.iro.umontreal.ca/~pinard






More information about the Python-list mailing list