Python, Press Any Key To Exit

后端 未结 9 1166
渐次进展
渐次进展 2020-12-31 06:16

So, as the title says, I want a proper code to close my python script. So far, I\'ve used input(\'Press Any Key To Exit\'), but what that does, is generate a er

9条回答
  •  有刺的猬
    2020-12-31 07:08

    Have you tried raw_input()? It could be that you are getting a syntax error by using input() on python 2.x, which will try to eval whatever it gets.

提交回复
热议问题