Python 字符串
python字符串折行
def pStr():
s1 = 'hello, world!'
s2 = "hello, world!"
# 以三个双引号或单引号开头的字符串可以折行
s3 = """
hello,
world!
"""
print(s1, s2, s3, end='')
运行结果:
python字符串转义
可以在字符串中使用\(反斜杠)来表示转义,也就是说\后面的字符不再是它原来的意义,例如:\n不是代表反斜杠和字符n,而是
转载
2020-09-08 14:48:46 ·
132 阅读 ·
0 评论