linuxprog at gmail.com
Thu Jun 21 15:42:03 CEST 2007
Stephen R Laniel a écrit :
> On Thu, Jun 21, 2007 at 06:23:01AM -0700, Nick wrote:
>> Why is there a apostrophe still at the end?
> Is it possible that you actually have whitespace at the end
> of the line? So then strip() is looking for an apostrophe at
> the end of the line, not finding it, and therefore not
> stripping it?
that should work for you ?
f1 = open('in.txt', 'r')
for line in f1:
maybe you got some \n \r at the end of each line
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Python-list