If you want to only print one curly brace (for example {
) you can use {{
, and you can add more braces later in the string if you want.
For example:
>>> f'{{ there is a curly brace on the left. Oh, and 1 + 1 is {1 + 1}'
'{ there is a curly brace on the left. Oh, and 1 + 1 is 2'