PythonStudy——字符串类型 String type

# 1.定义
# 需求:你是"好学生"
s1 = "你是"好学生""
print(s1)

# 可以通过引号的嵌套,使内部不同的引号在不转义的情况下直接输出
s2 = '你是"好学生"'
print(s2)

# 需求:你是"好学生",是'我的'
s3 = """你是"好学生",是'我的'"""
print(s3)
原文地址:https://www.cnblogs.com/tingguoguoyo/p/10726547.html