问题 So I'm trying to allow my user to input \n in a string, to designate a new line. However for some reason that is translated into '\\n'. So I can do: inp = input().replace("\\n", "\n") but that seems a little cumbersome; is there a better way? 回答1: What you're looking for here is actually almost the opposite of what you're asking for. input does not escape the string in any way; it returns exactly the string the user typed. And, in fact, your attempted fix for that is, while probably not the