2016年12月14日

python raw String 获取字符串变量中的反斜杠

摘要: 常用的获取raw string的方式为: >>>r'\n' \n 不能用在字符串变量中,获取字符串变量中的反斜杠如下: tab = '\n' >>>tab.encode('string-escape') \n 阅读全文

posted @ 2016-12-14 12:40 LebronZhang 阅读(862) 评论(0) 推荐(0) 编辑

导航