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='')
本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。