【发布时间】:2021-11-19 14:51:24
【问题描述】:
enter image description here enter image description here
我的 python 版本是 2.7.18(因为我的计算机的窗口为 7),每次我尝试使用 'input()' 进行编码时,它总是失败。我能做些什么? 另外,我的 python 中没有保存按钮。我绝对需要一种方法来保存我的代码 我真的希望得到一个快速的答复
【问题讨论】:
enter image description here enter image description here
我的 python 版本是 2.7.18(因为我的计算机的窗口为 7),每次我尝试使用 'input()' 进行编码时,它总是失败。我能做些什么? 另外,我的 python 中没有保存按钮。我绝对需要一种方法来保存我的代码 我真的希望得到一个快速的答复
【问题讨论】:
您应该在 python 2 中使用 raw_input() 函数而不是 input()。
【讨论】:
问题似乎与 print 语句有关,请仔细阅读这篇文章中的答案,以获取有关 Python 2.7 中 print 语句的更多详细信息 Should I use the print statement or function in Python 2.7?
【讨论】: