python輸出不換行

python輸出不換行

Python2的寫法是python

print 'hello',

Python3的寫法是code

print('hello', end='')

對於python2和python3都兼容的寫法是:io

from __future__ import print_function

print('hello', end='')
相關文章
相關標籤/搜索