I've checked this solution but it doesn't work in python3.
I've an escaped string of this kind: str = "Hello\nWorld"
and I want to obtain the same string unescaped: str_out = Hello
World
I tried with this without succes: AttributeError: 'str' object has no attribute 'decode'
Here my sample code:
str = "Hello\nWorld"
str.decode('unicode_escape')
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…