在 Python 3中 使用
input():
input("Press Enter to continue...")在 Python 2中 使用
raw_input():
raw_input("Press Enter to continue...")不过,这仅等待用户按下Enter键。
可能要使用 msvcrt ((仅Windows / DOS)使用 msvcrt 模块可以访问Microsoft Visual C / C
++运行时库(MSVCRT)中的许多功能):
import msvcrt as mdef wait(): m.getch()
这应该等待按键。
附加信息:
Python 3
raw_input()中不存在
在Python 2
input(prompt)中等效于
eval(raw_input(prompt))



