On 27/09/2010 17:11, Thierry Tung wrote:
Hello tutor at python.org.
How can I write strings to the console in a way that will give the same result
in Python 3 and Python 2?
I tried sys.stdout.write('hello') on Microsoft vista.
with python 3.1.2
sys.stdout.write('hello')
hello5
with py
Hello tutor at python.org.
How can I write strings to the console in a way that will give the same result
in Python 3 and Python 2?
I tried sys.stdout.write('hello') on Microsoft vista.
with python 3.1.2
>>>sys.stdout.write('hello')
hello5
>>>
with python 2.7
>>>sys.stdout.write('hello')
hel