python print 错误 ( invalid syntax)

刚刚在windows 上安装了python ,想print 字符串,但是一直报错 (python 3.3 .2版本)

>>> print hello
SyntaxError: invalid syntax
>>> print 'hello'
SyntaxError: invalid syntax
>>> print "hello"
SyntaxError: invalid syntax
>>> print "hello";
SyntaxError: invalid syntax
>>> print (hello)
Traceback (most recent call last):
  File "", line 1, in
    print (hello)
NameError: name 'hello' is not defined
>>> print ('hello')
hello

# 最后这个有效,好像和2.7版本的差别挺大的,不知道和不同平台有没有关系,之前一直在ubuntu上使用python

#  在ubuntu上,上面几种写法好像都支持

你可能感兴趣的:(语言)