I've a small script to find and replace strings since most text editors fail to do so for multiple files.
When I pass newline character(\n) as input, the python converts the slash to double slash and it no more stays are newline character. So, my search and replace fails.
++++++++++++++++++++++++++++++++++++
Adding suggested solutions here:
Solution 1.
As suggested by @Xu Qiushi
from shlex import quote as q
from ast import literal_eval as le
a = le(q(input()))
allows to take \n as it is.
Solution 2:
Directly providing a dictionary as dict_a = {'।\s' : '।\n'}
etc. works fine for search.