x = " \{ Hello \} {0} " print(x.format(42)) gives me : Key Error: Hello\\ I want to print the output: {Hello} 42 2 25 Tags: curly-bracesformatpythonstringstring-formatting