On Wed, Jul 14, 2010 at 12:26 PM, Alan Gauld <alan.ga...@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.
_______________________________________________
Tutor maillist  -  Tutor@python.org
To unsubscribe or change subscription options:
http://mail.python.org/mailman/listinfo/tutor

Reply via email to