python中”\“的用法
来源:互联网 发布:淘宝直播用什么摄像头 编辑:程序博客网 时间:2024/05/15 08:31
1.作为转义字符对字符串种的引号进行转义:
‘let’\s go!’
“let’s go!”
此处中‘\’即为转义字符
2.换行
print ‘Once upon a time, there was a king’\
‘called Gumby.’
输出结果为:Once upon a time,there was a king name called Gumby.
3.用于不同的字母前表示不同的含义:
如 \n表示换行,\t表示制表,(遇到再及时的更新)
print(“He is a boy, \n but she is a girl”)
结果
He is a boy,
but she is a girl.
0 0
- python中”\“的用法
- python中@的用法
- python中dict的用法 python中dict的用法
- Python中set的用法
- Python中set的用法
- Python中set的用法
- python中dict的用法
- python中dict的用法
- Python中yield的用法
- python中pickle的用法
- Python中@注解的用法
- Python中set的用法
- python中with的用法
- python 中with的用法
- python中 逗号的 用法
- python中 逗号的 用法
- Python中super的用法
- gflags中python的用法
- 最大公约数和最小公倍数___(广东工业大学2015校赛决赛)
- C语言中的static变量和C++静态数据成员 的访问情况
- 网页如何防止刷新重复提交与如何防止后退的解决方法
- 版本更新
- 最受欢迎的5个Android ORM框架
- python中”\“的用法
- SNMP 的table 变量测试
- 关于CB中输出汉字会变成乱码
- 判断IOS APP是否第一次启动
- android菜瓜笔记之TypedArray和obtainStyledAttributes使用场景
- 线段树
- UVa-401 Palindromes回文词——水
- xcode6.1.1 crash
- 解决VMware中装centOS后不能够上网及ping通的问题