解决python中字符串变量中包含单引号、双引号的问题

使用三重引号!

"""He"llo, {} and {}!""".format("""John""", """Ma'ry""")

posted on 2023-04-27 10:26  耀扬  阅读(194)  评论(0编辑  收藏  举报

导航