>>> print 'hello world'
hello world
>>> abs(-4)
4
>>> string = "hello world!"
>>> print string
hello world!
>>> string
'hello world!'
>>> python主提示符號,表示正在等待輸入下一個(gè)語句
... python次提示符號,表示正在等待輸入當(dāng)前語句的其他部分
>>> _
'hello world!'
_在解釋器中表示最后一個(gè)表達(dá)式的值。
>>> print "%s is number %d!" % ("Python", 1)
Python is number 1!
類C中的printf()
example for comment, >>> and ...
>>> #one comment
... print 'Hello World' #another comment
Hello World
python不支持++和--