How can I print literal curly-brace characters in a string and also use .format on it? by IT Nursery x = " \{ Hello \} {0} " print(x.format(42)) gives me : Key Error: Hello\\ I want to print the output: {Hello} 42 2 25