from __future__ import print_function,顾名思义,就是用比当前版本的python更新的版本的print函数,主要指在python2环境下用python3的print函数
在python2.7环境下运行以下代码,不会报错
from __future__ import print_function
print('hello world')
from __future__ import print_function,顾名思义,就是用比当前版本的python更新的版本的print函数,主要指在python2环境下用python3的print函数
在python2.7环境下运行以下代码,不会报错
from __future__ import print_function
print('hello world')