python escape sequences
| 转义字符 | 描述 |
|---|---|
| \(在行尾时) | 续行符 |
| \\ | 反斜杠符号 |
| \' | 单引号 |
| \" | 双引号 |
| \a | 响铃 |
| \b | 退格(Backspace) |
| \e | 转义 |
| \000 | 空 |
| \n | 换行 |
| \v | 纵向制表符 |
| \t | 横向制表符 |
| \r | 回车 |
| \f | 换页 |
| \oyy | 八进制数yy代表的字符,例如:\o12代表换行 |
| \xyy | 十进制数yy代表的字符,例如:\x0a代表换行 |
| \other | 其它的字符以普通格式输出 |
;-)
while True:
for i in ["/","-","|","\\","|"]:
print "%s \r" %i,
str_='\\'
print "%s" %str_
print "%r" %str_ str_1='\n'
print "%s" %str_1
print "%r" %str_1 \
'\\' '\n'
python escape sequences的更多相关文章
- Escape Sequences
(这篇随笔是 C++ Primer 5th ed. pp.39-40的摘录) Some characters, such as backspace or control characters, hav ...
- Escape Sequences in String
Code Output \' single quote \" double quote \\ backslash \n newline \r carriage return \t tab ...
- Python中文乱码
1,注意:请使用智慧型浏览器 "CHROME" 配合理解和运作本文中提到的程序. 2,提示:谷歌的CHROME浏览器是迄今为止最智慧的浏览器,没有之一,只有第一. 3,谷歌的CHR ...
- 【转】关于Python脚本开头两行的:#!/usr/bin/python和# -*- coding: utf-8 -*-的作用 – 指定文件编码类型
原文网址:http://www.crifan.com/python_head_meaning_for_usr_bin_python_coding_utf-8/ #!/usr/bin/python 是用 ...
- 【转载】关于Python脚本开头两行的:#!/usr/bin/python和# -*- coding: utf-8 -*-的作用 – 指定文件编码类型
1.#!/usr/bin/python 是用来说明脚本语言是 python 的 是要用 /usr/bin下面的程序(工具)python,这个解释器,来解释 python 脚本,来运行 python 脚 ...
- python unicode 转中文 遇到的问题 爬去网页中遇到编码的问题
How do convert unicode escape sequences to unicode characters in a python string 爬去网页中遇到编码的问题 Python ...
- Python内置函数(59)——open
英文文档: open(file, mode='r', buffering=-1, encoding=None, errors=None, newline=None, closefd=True, ope ...
- python 3.3.3 字面量,正则,反斜杠和原始字符串
两个不起眼但是比较重要的设定 Python str类型的字面量解释器 当反斜杠及其紧接字符无法构成一个具有特殊含义的序列('recognized escape sequences')时,Python选 ...
- Python内置函数(47)——open
英文文档: open(file, mode='r', buffering=-1, encoding=None, errors=None, newline=None, closefd=True, ope ...
随机推荐
- CRM客户关系管理系统(十三)
---客户资料添加 1.事件流程:
- Mac环境下装node.js,npm,express
1. 下载node.js for Mac 地址: http://nodejs.org/ 直接下载 pkg的,双击安装,一路点next,很容易就搞定了. 安装完会提醒注意 node和npm的路径是 /u ...
- 当前页面js代码
<script type="text/javascript"> var url = location.href; $(function(){ var url = loc ...
- var functionName = function() {} vs function functionName() {}
The difference is that functionOne is defined at run-time, whereas functionTwo is defined at parse-t ...
- LeetCode Combinations (DFS)
题意: 产生从1-n的k个数的所有组合,按升序排列并返回. 思路: DFS一遍即可解决.注意升序. class Solution { public: vector<vector<int&g ...
- setInterval 函数传参(方法一)
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/ ...
- allpaths 使用
软件下载与说明:http://www.broadinstitute.org/software/allpaths-lg/blog/?page_id=12 原始数据的深度要达到100以上. 至少要两个库, ...
- Java-->实现断点续传(下载)
--> 断点续传: 就像迅雷下载文件一样,停止下载或关闭程序,下次下载时是从上次下载的地方开始继续进行,而不是重头开始... --> RandomAccessFile --> poi ...
- SQL编写
//用户表,用户ID,用户名称create table t_user (user_id int,username varchar(20));//用户帐户表,用户ID,用户余额(单位分)create t ...
- Fresco好案例
http://www.open-open.com/lib/view/open1436094840774.html