Daily Software Tips & Tricks
Bite-sized knowledge to improve your coding skills daily.
Debugging with f-strings
March 25, 2026
If you're still writing "print(f'user_id: {user_id}')" to debug your Python code, there's a much shorter way. Since Python 3.8, you can add an equals sign inside the curly braces like this: "print(f'{user_id=}')". This will automatically output both the variable name and its value, formatted cleanly. It saves a ton of repetitive typing when you're quickly trying to trace state through a complex function.