您可以使用raw string方法,只需在字符串前添加不带引号的字符“r”。
# to print '{I am inside braces}' print(r'{I am inside braces}')