2024-09-27 00:15:33 发布
网友
作为试用,我在Python2.7.8中使用了以下代码:
print 'one', 'two', 'three', sep =''
我得到的信息是
SyntaxError: invalid syntax
我想要的结果是
onetwothree
print()函数是Python3的一个特性,但是您可以像这样在Python2上获得它
print()
>>> from __future__ import print_function >>> print('one', 'two', 'three', sep='') onetwothree
print()
函数是Python3的一个特性,但是您可以像这样在Python2上获得它相关问题 更多 >
编程相关推荐