Below is my code in ipython where I am adding a string value named "search_pattern" with a backslash to a dictionary. But when I print that dictionary back, it is replacing backslash with 2 backslashes. How can I add "search_pattern" to the dictionary as the original string.
In [91]: search_pattern = '"code":2[,}]|"vnew":"2/|"url":"(/o|/\.[^/]|/r=[^/])*/2[/"?]'
In [92]: test = {
...: "test" : search_pattern
...: }
In [93]: test
Out[93]: {'test': '"code":2[,}]|"vnew":"2/|"url":"(/o|/\\.[^/]|/r=[^/])*/2[/"?]'}
In [94]: print(test)
{'test': '"code":2[,}]|"vnew":"2/|"url":"(/o|/\\.[^/]|/r=[^/])*/2[/"?]'}
In [95]: type(test)
Out[95]: dict