python 第一步
阿新 • • 發佈:2019-02-14
>>> print "hello ,world!"
SyntaxError: invalid syntax
>>> print "hello"
SyntaxError: invalid syntax
>>> printf ("hello")
Traceback (most recent call last):
File "<pyshell#2>", line 1, in <module>
printf ("hello")
NameError: name 'printf' is not defined
>>> printf 'hello'
SyntaxError: invalid syntax
>>> printf ('hello')
Traceback (most recent call last):
File "<pyshell#4>", line 1, in <module>
printf ('hello')
NameError: name 'printf' is not defined
>>> printf("hello")
Traceback (most recent call last):
File "<pyshell#5>", line 1, in <module>
printf("hello")
NameError: name 'printf' is not defined
>>> printf 5
SyntaxError: invalid syntax
>>> print ("hello")
hello
>>> print (5)
5
SyntaxError: invalid syntax
>>> print "hello"
SyntaxError: invalid syntax
>>> printf ("hello")
Traceback (most recent call last):
File "<pyshell#2>", line 1, in <module>
printf ("hello")
NameError: name 'printf' is not defined
>>> printf 'hello'
SyntaxError: invalid syntax
>>> printf ('hello')
Traceback (most recent call last):
File "<pyshell#4>", line 1, in <module>
printf ('hello')
NameError: name 'printf' is not defined
>>> printf("hello")
Traceback (most recent call last):
File "<pyshell#5>", line 1, in <module>
printf("hello")
NameError: name 'printf' is not defined
>>> printf 5
SyntaxError: invalid syntax
>>> print ("hello")
hello
>>> print (5)
5
>>>
版本與教程不一致