#python2
>>> print('sldk','ksl')
('sldk', 'ksl')
#python3
>>> print('slkd','skdj')
slkd skdj
from __future__ import print_function
import six
input = six.moves.input
from __future__ import division
#python2
>>> print('sldk','ksl')
('sldk', 'ksl')
#python3
>>> print('slkd','skdj')
slkd skdj
from __future__ import print_function
import six
input = six.moves.input
from __future__ import division
本文标题:如何写出兼容python2和python3的代码
本文链接:https://www.haomeiwen.com/subject/sdwgwxtx.html
网友评论