newbie question: if var1 == var2:

greg greg at cosc.canterbury.ac.nz
Thu Dec 11 18:49:32 EST 2008


Kirk Strauser wrote:
> At 2008-12-11T19:49:23Z, Steve Holden <steve at holdenweb.com> writes:
>
>>     item = item[:-1]
> 
> It's easy - and broken.  Bad things happen if you're using something other
> than '\n' for EOL.

Or if the last line of your file doesn't end
with a newline.

-- 
Greg




More information about the Python-list mailing list