In Python, I have a string:
a = "\s"
In JavaScript, a
would be the single letter "s"
, but in Python, a
would be "\s"
.
How can I make Python behave the same way as JavaScript in this situation?
the real case may be more complicate :
a = "<div class=\"haha\"><\/div>"
, In this case , JavaScript get right HTML but python failed