干草,我只是做了以下内容:为什么eclipse + pydev的print()输出看起来奇怪的两个字符串?
a = input("give a word: ")
b = input("give another word: ")
c = a + " " + b
print("result is", c)
,并得到输出如下:
give a word: name
give another word: word
result is name
word
我的问题是,为什么在PyDev的输出或两行Eclipse控制台?我预计输出如下:
give a word: name
give another word: word
result is name word
这是怎么发生的,为什么发生在我身上?在CMD它看起来很好?? ??
此外,我发现python保存字符串与“\ r”,我认为这是在pydev控制台上这个问题,是吗?
哟,结果是名字,兄弟!字! – Thomas 2010-03-27 18:23:30
什么?,我不明白你在说什么 – srisar 2010-03-27 18:25:31
没关系。你可以/应该使用'raw_input'而不是'input'。它不那么可怕,因为它不会执行'eval'。 – Thomas 2010-03-27 18:25:57