這篇文章詳解Python中的轉義字元的用法
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的字元
#
以上是詳解Python中的轉義字符的用法的詳細內容。更多資訊請關注PHP中文網其他相關文章!