python抱怨双引号

时间:2015-03-05 23:17:00

标签: python

我为Windows 64bit下载了Python,但它并没有运行最基本的命令。我已经把我的程序剥离到了一行,python正在抱怨。我怀疑它必须与我下载的任何内容但不知道如何继续。建议?

print "Let's play Battleship!"

结果:

  File "b.py", line 2
    print "Let's play Battleship!"
                                 ^
SyntaxError: invalid syntax

1 个答案:

答案 0 :(得分:3)

打印声明在3.x中更改。尝试:

print("let's play battleship!")