- 使用长字符
print('''This is a very long string.It continues here. And it's not over yet."Hello,world!" Still here.''') #'''可以换成""",即单引号换成双引号
- 使用反斜杠(\)
print("Hello,\
world!")
#这种处理手法也适用于表达式和语句
print('''This is a very long string.It continues here.
And it's not over yet."Hello,world!"
Still here.''')
#'''可以换成""",即单引号换成双引号
print("Hello,\
world!")
#这种处理手法也适用于表达式和语句