字符串可以用单引号或者双引号标注分隔出来(但引号需要配对,即单引号对单引号,双
引号对双引号):
single_quoted_string = 'data science'
double_quoted_string = "data science"
Python 用反斜线来为特殊字符编码。比如:
tab_string = "\t" # 表示tab字符
len(tab_string) # 是1
如果你希望反斜线仅仅代表反斜线本身(你在 Windows 系统中的文件夹或者正则表达式中
也许会遇到), 那么可以使用命令 r"" 生成一个原始的字符串:
not_tab_string = r"\t" # 表示字符'\'和't'
len(not_tab_string) # 是2
你可以通过三重[两重]引号来生成多行的字符串:
multi_line_string = """This is the first line.
and this is the second line
and this is the third line"""
三个资料Q群下载不了也转发不了,先放这里Fine_tuning.zipLangChain.zipdata_clear.rar