Tuesday, March 15, 2016

Escape Sequences

his all of the escape sequences Python supports. You may not use many of these, but memorize their format and what they do anyway. Try them out in some strings to see if you can make them work.
ESCAPEWHAT IT DOES.
\\Backslash (\)
\'Single-quote (')
\"Double-quote (")
\aASCII bell (BEL)
\bASCII backspace (BS)
\fASCII formfeed (FF)
\nASCII linefeed (LF)
\N{name}Character named name in the Unicode database (Unicode only)
\rCarriage Return (CR)
\tHorizontal Tab (TAB)
\uxxxxCharacter with 16-bit hex value xxxx (Unicode only)
\UxxxxxxxxCharacter with 32-bit hex value xxxxxxxx (Unicode only)
\vASCII vertical tab (VT)
\oooCharacter with octal value ooo
\xhhCharacter with hex value hh

No comments:

Post a Comment