[Tutor] Searching a text file's contents and comparing them toa list
ehamiter at gmail.com
Wed Jul 14 19:39:29 CEST 2010
On Wed, Jul 14, 2010 at 12:26 PM, Alan Gauld <alan.gauld at btinternet.com>wrote:
> If you never need a stripped version of line again, or if you
> are planning on writing it out to another file then this is fine.
> If you are going to use it again its probably better to strip()
> and asign to itelf:
> line = line.strip()
> Also you might find rstrip() slightly safer if you have any
> unusual characters at the start of line...
Thanks for the tip Alan, I think I'll assign it to itself.
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Tutor