Daily Software Tips & Tricks
Bite-sized knowledge to improve your coding skills daily.
Debugging Faster with Python F-Strings
February 22, 2026
If you’re a Python dev, you likely already use f-strings for formatting, but did you know about the `=` shortcut for debugging? Instead of writing `print(f"user_id: {user_id}")`, you can just write `print(f"{user_id=}")`.
This syntax automatically prints the variable name followed by its value. It’s a tiny trick that saves a lot of repetitive typing and prevents those silly typos when you're trying to quickly trace state in a complex loop or function.