Python學習筆記(3)Python中

  • 2020 年 1 月 12 日
  • 筆記

Escape

What it does.

含義

\

Backslash ()

反斜杠

'

Single-quote (')

單引號

"

Double-quote (")

雙引號

a

ASCII bell (BEL)

響鈴符

b

ASCII backspace (BS)

退格符

f

ASCII formfeed (FF)

進紙符

n

ASCII linefeed (LF)

換行符

N{name}

Character named name in the Unicode database (Unicode only)

Unicode資料庫中的字元名;name就是它的名字

r ASCII

Carriage Return (CR)

回車符

t ASCII

Horizontal Tab (TAB)

水平製表符

uxxxx

Character with 16-bit hex value xxxx (Unicode only)

值為16位十六進位xxxx的字元

Uxxxxxxxx

Character with 32-bit hex value xxxxxxxx (Unicode only)

值為32位十六進位xxxx的字元

v

ASCII vertical tab (VT)

垂直製表符

ooo

Character with octal value ooo

值為八進位ooo的字元

xhh

Character with hex value hh

值為十六進位數hh的字元