---
title: "Python: f-string help"
url: https://perrotta.dev/2025/08/python-f-string-help/
last_updated: 2025-08-22
---


[Python f-strings](https://fstring.help/).

[Python f-string cheat sheets](https://fstring.help/cheat/).

These one-pagers are wholesome.

The ones I remember:

```
% python3
Python 3.13.7 (main, Aug 14 2025, 11:12:11) [Clang 17.0.0 (clang-1700.0.13.3)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> hello = 'world'
>>> hello
'world'
>>> f'{hello}'
'world'
>>> f'{hello=}'  # handy for debugging, or during coding interviews
"hello='world'"
>>> f'{hello = }'  # same as the above, but slightly more readable
"hello = 'world'"
```

