-
print
python 2: print ‘hello world’
python 3: print(‘hello world’) -
字符串类型
python2: 有unicode 和 str
python3: 有str (相当于python2的unicode) 和 bytes (相当于python2的str) -
xrange
python2: xrange, range
python3: 木有xrange, range等价于python2的xrange
print
python 2: print ‘hello world’
python 3: print(‘hello world’)
字符串类型
python2: 有unicode 和 str
python3: 有str (相当于python2的unicode) 和 bytes (相当于python2的str)
xrange
python2: xrange, range
python3: 木有xrange, range等价于python2的xrange