> For the complete documentation index, see [llms.txt](https://til.kurianbenoy.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://til.kurianbenoy.com/python/f-strings-debugging-shortcut.md).

# f-strings debugging shortcut

Instead of typing things, with it's value twice. With f-strings there is a nice shortcut.

**Without f-strings:**<br>

```
number = 32
print(f"number={number}")

cards = {'R':4, 'J': 24}
print("cards", cards)
```

**With fstrings**

```
 print(f"{number = }")
 # returns number = 32
 print(f"{cards = }")
# returns cards {'R': 4, 'J': 24}
```
