Re: [Tutor] Tutor Digest, Vol 38, Issue 10

2007-04-06 Thread Jay Mutter III
Jay Mutter III [EMAIL PROTECTED] wrote Whether I attempt to just strip the string or attempt to if line.endswith('No.\r'): line = line.rstrip() It doesn't work. Can you try printing the string repr just before the test. Or even the last 6 characters: print repr(line[-6:]) if

Re: [Tutor] Tutor Digest, Vol 38, Issue 10

2007-04-06 Thread Alan Gauld
Jay Mutter III [EMAIL PROTECTED] wrote Can you try printing the string repr just before the test. Or even the last 6 characters: print repr(line[-6:]) if line.endswith('No: \n') line = line.strip() Alan using your suggestion with the code aove here is the print out: