用from __future__ import print_function
# python
Python 2.7.9 (default, Jun 29 2016, 13:08:31)
[GCC 4.9.2] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> list =["a", "b", "c"]
>>> print list
['a', 'b', 'c']
>>> from __future__ import print_function
>>> print (list)
['a', 'b', 'c']
>>>
Python3 与 Python2 的许多兼容性设计的功能可以通过 __future__ 这个包来导入。