Python 系列笔记

马士兵教育 Python 入门基础:1.python 入门(一)

马士兵教育 Python 入门基础:1.python 入门(二)

马士兵教育 Python 入门基础:2. 七十二变(1)

马士兵教育 Python 入门基础:2. 七十二变(2)

马士兵教育 Python 入门基础:3. 运算(1)

马士兵教育 Python 入门基础:3. 运算(2)

马士兵教育 Python 入门基础:4. 流程控制(1)

马士兵教育 Python 入门基础:4. 流程控制 (2)

马士兵教育 Python 入门基础:4. 流程控制 (3)

# 转义字符

反斜杠 + 想要实现的转义功能首字母

image-20200923191259677

# 作者:周小钊
# 时间:2020/9/23 19:18
## 转义字符
print ("hello\nworld")
print ("hello\tworld")
print ("hello\rworld")
print ("hello\bworld")
## 原字符。不希望字符串中的转义字符其作用,就使用原字符,就是在字符串之前加上 r 或 R
print (r"hello\rworld")
## 注意事项,最后一个字符不能是反斜杠
hello
world
hello	world
world
hellworld
hello\rworld
更新于 阅读次数

请我喝[茶]~( ̄▽ ̄)~*

amane 微信支付

微信支付

amane 支付宝

支付宝