Alan <alan.becc...@gmail.com> added the comment: Using repr highlights the issue which lies in the behaviour of str.strip() which does not strip away null spaces as I would have expected:
' 'utm10\x00' ' == ' 'utm10' ' not equal Changing the code to: currColl=line.split(":")[1].strip().strip("\0") works but I think strip() should already do that by default, shouldn't it? ---------- _______________________________________ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue13427> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com