在Python中print函数输出不会自动换行因此如下两条语句:printHello printWorld!
会输出:
Hello World!
如果希望两个语句连续输出,可以使用print函数的end参数,将其设为空字符串:
print('Hello ', end='') print('World!')
这样输出的结果就是:
Hello World!
原文地址: https://www.cveoy.top/t/topic/hsPa 著作权归作者所有。请勿转载和采集!
安全问答是一个知识全球问答,包含丰富的问答知识
会输出:
Hello World!
如果希望两个语句连续输出,可以使用print函数的end参数,将其设为空字符串:
print('Hello ', end='') print('World!')
这样输出的结果就是:
Hello World!
原文地址: https://www.cveoy.top/t/topic/hsPa 著作权归作者所有。请勿转载和采集!