我有以下Python代码:为什么input()在我按下回车键时出错?
print 'This is a simple game.'
input('Press enter to continue . . .')
print 'Choose an option:'
...
但是,当我按下回车按钮,我得到以下错误:
Traceback (most recent call last):
File "E:/4.Python/temp.py", line 2, in <module>
input('Press enter to continue . . .')
File "<string>", line 0
^
SyntaxError: unexpected EOF while parsing
附:我在Windows 7上使用Python IDLE 2.6版。
+1例如:-) – user225312 2011-02-17 07:20:59