python输出不换行

python输出不换行

Python2的写法是python

print 'hello',

Python3的写法是code

print('hello', end='')

对于python2和python3都兼容的写法是:io

from __future__ import print_function

print('hello', end='')
相关文章
相关标签/搜索