What does “SyntaxError: Missing parentheses in call to 'print'” mean in Python?

前端 未结 8 1307
天命终不由人
天命终不由人 2020-11-21 09:02

When I try to use a print statement in Python, it gives me this error:

>>> print \"Hello, World!\"
  File \"\", line 1
            


        
8条回答
  •  渐次进展
    2020-11-21 09:49

    Unfortunately, the old xkcd comic isn't completely up to date anymore.

    Since Python 3.0 you have to write:

    print("Hello, World!")
    

    And someone has still to write that antigravity library :(

提交回复
热议问题