I have an issue transforming my current variable(which is a dictionary) into a literal string. I have a dictionary variable such as :
tmp = {"e":"abc' efg"}
And I want to convert tmp
into a string, such as
'''{"e":"abc' efg"}'''
However, when I use str(tmp)
, I get
'{\'e\': "abc\' efg"}'
which I do not want to have escape symbol for the string.
How would I get a value such that
'''{"e":"abc' efg"}'''
In another word, I am looking forward an operation(op) such that
op(tmp)==tmp1
is true
, where tmp = {"e":"abc' efg"}, tmp1='''{"e":"abc' efg"}'''
.