Python 中的引号
pythonserver side programmingprogramming更新于 2025/3/21 21:00:17
Python 接受单引号 (')、双引号 (") 和三引号 (''' 或 """) 来表示字符串文字,只要字符串的开头和结尾是同一种类型的引号即可。
三引号用于将字符串跨越多行。例如,以下所有内容都是合法的 −
word = 'word' sentence = "This is a sentence." paragraph = """This is a paragraph. It is made up of multiple lines and sentences."""
相关文章
有用资源
python 参考教程 - 该教程包含有关 python 的更多信息:https://www.cainiaomax.com/python/

