Python中的引语
Python接受单引号('),双引号(“)和三引号('''或”“”)表示字符串文字,只要相同类型的引号开始和结束字符串即可。
三重引号用于将字符串跨越多行。例如,以下所有都是合法的-
word = 'word' sentence = "This is a sentence." paragraph = """This is a paragraph. It is made up of multiple lines and sentences."""
Python接受单引号('),双引号(“)和三引号('''或”“”)表示字符串文字,只要相同类型的引号开始和结束字符串即可。
三重引号用于将字符串跨越多行。例如,以下所有都是合法的-
word = 'word' sentence = "This is a sentence." paragraph = """This is a paragraph. It is made up of multiple lines and sentences."""