示例示例Python中的三个引号('''或""")用于表示多行字符串,它可以包含换行符、制表符和其他特殊字符。示例代码:
Python中的三个引号('''或""")用于表示多行字符串,它可以包含换行符、制表符和其他特殊字符。
示例代码:
str = '''This is a multi-line string.
It contains multiple lines of text.
It can also contain special characters like tab(\t) and new line (\n).'''
print(str)
输出:
This is a multi-line string.
It contains multiple lines of text.
It can also contain special characters like tab(\t) and new line (\n).
本站系公益性非盈利分享网址,本文来自用户投稿,不代表边看边学立场,如若转载,请注明出处
评论列表(9条)