Py3.3 unicode literal and input()

jmfauth wxjmfauth at gmail.com
Mon Jun 18 04:19:32 EDT 2012


What is input() supposed to return?

>>> u'a' == 'a'
True
>>>
>>> r1 = input(':')
:a
>>> r2 = input(':')
:u'a'
>>> r1 == r2
False
>>> type(r1), len(r1)
(<class 'str'>, 1)
>>> type(r2), len(r2)
(<class 'str'>, 4)
>>>

---

sys.argv?

jmf



More information about the Python-list mailing list