Python2的写法是

print 'hello',

Python3的写法是

print('hello', end='')

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

from __future__ import print_function

print('hello', end='')

相关文章:

  • 2022-12-23
  • 2021-06-28
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
猜你喜欢
  • 2022-12-23
  • 2022-12-23
  • 2021-08-17
  • 2022-12-23
  • 2022-12-23
  • 2021-08-24
  • 2022-12-23
相关资源
相似解决方案