We usually use the backslash to escape illegal characters.
For example, escaping the double quotes.
>>> "\"" == '"'
True
In f-strings, curly braces are used for placeholding. To represent a curly brace, the braces are doubled.
For example,
>>> f"{{}}" == "{}"
True
Why was this intuitive approach not favored when developing f-strings? Is there some technical or design reason?
>>> f'\{\}'
File "<stdin>", line 1
SyntaxError: f-string expression part cannot include a backslash