python输出不换行
Python2的写法是:
print 'hello',
Python3的写法是:
print('hello', end='')
对于python2和python3都兼容的写法是:
from __future__ import print_function
print('hello', end='')
Python2的写法是:
print 'hello',
Python3的写法是:
print('hello', end='')
对于python2和python3都兼容的写法是:
from __future__ import print_function
print('hello', end='')