Python2的寫法是:python
print 'hello',
Python3的寫法是:code
print('hello', end='')
對於python2和python3都兼容的寫法是:io
from __future__ import print_function print('hello', end='')