# 让字符串按照愿意输出 print(repr("hello\nworld")) print("hello\\nworld") print(r"hello\nworld")
结果
‘hello\nworld‘ hello\nworld hello\nworld
字符串按照愿意输出
原文:https://www.cnblogs.com/alicelai1319/p/10740625.html