显示原始字符串

在使用字符串的时,会出现带有特殊字符的字符串,例如反斜杠'\'

例如这个语句:print('hello,\world')

会显示:

hello,

world

若要显示出'\',需要这样写:

print(r'hello,\world')  #加前缀r

原文地址:https://www.cnblogs.com/yinguojin/p/8563720.html