如果需要在一个字符串中嵌入一个双引号,该如何做?

有两种方法:1.用转义字符(\)对双引号进行转义(\"),如>>>print("I l\"o\"ve fishc.com")

                   2.用单引号将双引号引起来,如>>>print('I l"o"ve fishc.com')

猜你喜欢

转载自blog.csdn.net/weixin_41790863/article/details/80587624