How to escape “\” characters in python

后端 未结 4 1586
广开言路
广开言路 2020-12-11 07:46

i am very new to regular expression and trying get \"\\\" character using python

normally i can escape \"\\\" like this

print (\"\\\\\");
print (\"         


        
4条回答
  •  青春惊慌失措
    2020-12-11 08:10

    It is unnecessary to escape backslashes in raw strings, unless the backslash immediately precedes the closing quote.

提交回复
热议问题