转义字符 描述
\(在行尾时) 续行符
\\ 反斜杠符号
\' 单引号
\" 双引号
\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的更多相关文章

  1. Escape Sequences

    (这篇随笔是 C++ Primer 5th ed. pp.39-40的摘录) Some characters, such as backspace or control characters, hav ...

  2. Escape Sequences in String

     Code Output \' single quote \" double quote \\ backslash \n newline \r carriage return \t tab ...

  3. Python中文乱码

    1,注意:请使用智慧型浏览器 "CHROME" 配合理解和运作本文中提到的程序. 2,提示:谷歌的CHROME浏览器是迄今为止最智慧的浏览器,没有之一,只有第一. 3,谷歌的CHR ...

  4. 【转】关于Python脚本开头两行的:#!/usr/bin/python和# -*- coding: utf-8 -*-的作用 – 指定文件编码类型

    原文网址:http://www.crifan.com/python_head_meaning_for_usr_bin_python_coding_utf-8/ #!/usr/bin/python 是用 ...

  5. 【转载】关于Python脚本开头两行的:#!/usr/bin/python和# -*- coding: utf-8 -*-的作用 – 指定文件编码类型

    1.#!/usr/bin/python 是用来说明脚本语言是 python 的 是要用 /usr/bin下面的程序(工具)python,这个解释器,来解释 python 脚本,来运行 python 脚 ...

  6. python unicode 转中文 遇到的问题 爬去网页中遇到编码的问题

    How do convert unicode escape sequences to unicode characters in a python string 爬去网页中遇到编码的问题 Python ...

  7. Python内置函数(59)——open

    英文文档: open(file, mode='r', buffering=-1, encoding=None, errors=None, newline=None, closefd=True, ope ...

  8. python 3.3.3 字面量,正则,反斜杠和原始字符串

    两个不起眼但是比较重要的设定 Python str类型的字面量解释器 当反斜杠及其紧接字符无法构成一个具有特殊含义的序列('recognized escape sequences')时,Python选 ...

  9. Python内置函数(47)——open

    英文文档: open(file, mode='r', buffering=-1, encoding=None, errors=None, newline=None, closefd=True, ope ...

随机推荐

  1. JavaScript封装的几种方式

    JS 对象封装的常用方式 JS是一门面向对象语言,其对象是用prototype属性来模拟的.来看看如何封装JS对象. 常规封装 function Person (name,age,sex){ this ...

  2. PhP访问mysql数据库的基本方式

    一,查询 <?php$conn= mysql_connect("127.0.0.1","lanou12","lanou12");$fi ...

  3. 2、SQL基础整理(聚合函数)

    聚合函数 --求平均 select  AVG(age) as 年龄 from xuesheng select AVG(chinese) as 语文 from xuesheng where class ...

  4. LCA(倍增)

    type arr=record v,nt:longint; end; ; lx=; ..maxn] of longint; eg:..maxn*] of arr; d:..maxn] of longi ...

  5. HDU 3605

    http://acm.hdu.edu.cn/showproblem.php?pid=3605 用最大流做的,G++超时,C++可以过,看别人写的叫二分图多重匹配,还不会这玩意一会学学 显然的最大流模型 ...

  6. NSIS安装制作基础教程[初级篇], 献给对NSIS有兴趣的初学者

    NSIS安装制作基础教程[初级篇], 献给对NSIS有兴趣的初学者 作者: raindy 来源:http://bbs.hanzify.org/index.php?showtopic=30029 时间: ...

  7. 12-1 上午mysql 基本语句

    create table test( code varchar(20) primary key, name varchar(20)); 关键字primary key 主键非空 not nullfore ...

  8. 如何在magento后台增加一个自定义订单状态

    magento后台订单状态(order status)只有Pending.Processing.On Hold.Closed.Canceled.Pending Payment 等等,如何在magent ...

  9. 二维数组的传输 (host <-> device)

    前言 本文的目的很明确:介绍如何将二维数组传递进显存,以及如何将二维数组从显存传递回主机端. 实现步骤 1. 在显存中为二维数组开辟空间 2. 获取该二维数组在显存中的 pitch 值 (cudaMa ...

  10. lanuchy快捷操作

    down arrow: display history shift+delete: remove the item from the distory