∈鱼杆 ---我的鱼塘

执着,坚定,友爱,勇敢(www.pumaboyd.com)Live Message

导航

Python转义字符列表[转]

Posted on 2008-09-08 19:23  ∈鱼杆  阅读(6019)  评论(0编辑  收藏  举报

《Learning Pyth0n 2nd Ed》中的列表:

Escape

Meaning

\newline

Ignored (continuation)

\\

Backslash (keeps a \)

\'

Single quote (keeps `)

\"

Double quote (keeps ")

\a

Bell

\b

Backspace

\f

Formfeed

\n

Newline (linefeed)

\r

Carriage return

\t

Horizontal tab

\v

Vertical tab

\N{id}

Unicode dbase id

\uhhhh

Unicode 16-bit hex

\Uhhhh...

Unicode 32-bit hex[1]

\xhh

Hex digits value hh

\ooo

Octal digits value

\0

Null (doesn't end string)

\other

Not an escape (kept)