Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.python > #3691

py32 on windows - input() includes trailing \r

From "Frank Millman" <frank@chagford.com>
Subject py32 on windows - input() includes trailing \r
Date 2011-04-20 14:31 +0200
Newsgroups comp.lang.python
Message-ID <mailman.639.1303302750.9059.python-list@python.org> (permalink)

Show all headers | View raw


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

Back to comp.lang.python | Previous | Next | Find similar


Thread

py32 on windows - input() includes trailing \r "Frank Millman" <frank@chagford.com> - 2011-04-20 14:31 +0200

csiph-web