import os
print os.linesep.join(["99 buckets of bits on the bus.",
"99 buckets of bits.",
"Take one down, short it to ground.",
"98 buckets of bits on the bus."])
print chr(10).join([
'99 buckets of bits on the bus.',
'99 buckets of bits.',
'Take one down, short it to ground.',
'98 buckets of bits on the bus.'
])
对于三引号字符串文本,您可以使用实际的换行,而不是
\n
。在这似乎有效:
相关问题 更多 >
编程相关推荐