"Rikard Bosnjakovic" <[EMAIL PROTECTED]> wrote
>>>> s1 = "some line\n"
>>>> s2 = "some line"
>>>> s1.endswith("line"), s2.endswith("line")
> (False, True)
>
> Just skip the if and simply rstrip the string.Or add \n to the endswith() test string if you really only want to strip the newline in those cases.... Alan G. _______________________________________________ Tutor maillist - [email protected] http://mail.python.org/mailman/listinfo/tutor
