码迷,mamicode.com
首页 > 编程语言 > 详细

python escape sequences

时间:2016-12-13 15:46:52      阅读:220      评论:0      收藏:0      [点我收藏+]

标签:class   ace   ble   ack   回车   引号   color   转义   table   

 

 

转义字符描述
\(在行尾时) 续行符
\\ 反斜杠符号
\‘ 单引号
\" 双引号
\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

标签:class   ace   ble   ack   回车   引号   color   转义   table   

原文地址:http://www.cnblogs.com/dadadechengzi/p/6170034.html

踩
(0)
赞
(0)
   
举报
评论 一句话评论(0)
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!