R. David Murray added the comment:
Windows makes \x00 a space? How odd.
This is the result for me on linux:
Python 2.7.3+ (2.7:1f5d2642929a, May 25 2012, 12:47:34)
[GCC 4.5.3] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> test = "Hi there :)"
>>> print
New submission from Jānis :
test = "Hi there :)"
print len(test), test // Prints "11 Hi there :)"
test = test.replace(" ", "\x00")
print len(test), test // Prints "11
On Windows '\x00' is same as ' ', but on linux string is terminated at first
occurance of '\x00'. Results on proble