我目前正在学习 Python,并编写了一个程序来试验该语言。但是,每当我使用它时,输出总是在某处有一个字母“u”。我使用 Pyscripter 作为我的 IDE。
这是我的代码:
print "whats your name"
age = raw_input()
print "Alright, so %r, I just realized what percent-r does actually or is meant for" % (age)
print "What next ur age",
age1 = raw_input()
print "you entered %r " % (age1)
当我运行它时,我看到如下内容:
>>> Python 2.7.5 (default, May 15 2013, 22:43:36) [MSC v.1500 32 bit (Intel)] on win32.
>>> whats your name (i typed kk)
>>> Alright, so u'kk', i just realized what percent-r does actually or is meant for
>>> what next ur age (i typed ll)
>>> you entered u'll'
为什么我的输出中有一个随机u
字符,而不仅仅是我想要的字符串?