Answers for "how to read backslash python"

10

backslash in python

In python a backslash is used a an escape character, if you want to
include a tab, newline, quote or any unicode character, you must use a
backslash.

''' - quote
'"' - double quote
'n' - newline
't' - tab
'r' - carriage return
'\' - backslash
'u...' - unicode character (replace ... with the corresponding 4-digit number)
'b' - backspace
'f' - form feed
'ooo...' octal value (replace ...)
'x..' hexadecimal value (replace .. with two characters)
Posted by: Guest on April-07-2021
0

how to read backslash slash python

#Use the syntax r"" to treat backslash () as a literal character, and 
#not as an escape character.

raw_text = r"abc123"

print(raw_text)
OUTPUT
abc123
Posted by: Guest on September-02-2021

Python Answers by Framework

Browse Popular Code Answers by Language