Python print输出不换行
Python print 输出不换行
*Python 版本 2.7 *
方法一
print "123",
print "456"
优点:方便
缺点:中间有间隔
方法二
#文件首行或第二行
1:from __future__ import print_function
print('123123', end='')
*Python 版本 2.7 *
方法一
print "123",
print "456"
优点:方便
缺点:中间有间隔
方法二
#文件首行或第二行
1:from __future__ import print_function
print('123123', end='')