python2的print使用方法为:print "Hello", "world!"
> Hello world!python3的print使用方法为print("Hello", "world!")
> Hello world!print()方式在python2版本是无法使用的,在python2.6版本中,print函数可以通过 __future__包向后兼容:# In Python 2.6+ from __future__ import print_function print("Hello", "world!")
> Hello world!
查看原文:http://data.1kapp.com/?p=276