在引号内使用引号

在引号内使用引号,第1张

引号内使用引号

您可以通过以下三种方式之一进行 *** 作:

  1. 一起使用单引号和双引号:

    print('"A word that needs quotation marks"')"A word that needs quotation marks"
  2. 转义字符串中的双引号:

    print(""A word that needs quotation marks"")"A word that needs quotation marks"
  3. 使用三引号引起来的字符串:

    print(""" "A word that needs quotation marks" """)"A word that needs quotation marks"


欢迎分享,转载请注明来源:内存溢出

原文地址: https://outofmemory.cn/zaji/5620217.html

(0)
打赏 微信扫一扫 微信扫一扫 支付宝扫一扫 支付宝扫一扫
上一篇 2022-12-15
下一篇 2022-12-15

发表评论

登录后才能评论

评论列表(0条)

保存