我只是想打开一个.py并在黑色控制台上打印此报价。 input()与C ++中的system("PAUSE")
相同吗?
print(“Quote: If people do not believe that mathematics is simple, it's")
print(" only because they do not realize how complicated life is.”)
print("By: John von Neumann")
input()
谢谢,我真的想让它发挥作用!
这是输出:
Python 3.2.3 (default, Apr 11 2012, 07:15:24) [MSC v.1500 32 bit (Intel)]
Type "help", "copyright", "credits" or "license" for more information.
[evaluate untitled-1.py]
Traceback (most recent call last):
File "None", line 4, in <module>
Syntax Error: print (“Quote: If people do not believe that mathematics is simple, it's): None, line 415
答案 0 :(得分:2)
input()
应该有效,因此它可能是复制和粘贴中的错误引号字符,它会给您一个错误。尝试将这些”
更改为"
,或者更好地使用带有"""triple quotes"""
的多行字符串。