py32 on windows - input() includes trailing \r

Frank Millman frank at chagford.com
Wed Apr 20 08:31:50 EDT 2011


Hi all

On linux, python 3.2 -

>>> x = input()
xyz
>>> len(x)
3
>>> x
'xyz'

on windows, python 3.2 -

>>> x = input()
xyz
>>> len(x)
4
>>> x
'xyz\r'

Is this expected behaviour?

Frank Millman





More information about the Python-list mailing list