2
Stop using 'print' to debug everything, it's making your code a mess
I was helping a friend with their first Python project and their script had over 30 print statements just to track a simple loop. They said they saw it in a YouTube tutorial from 'Coding with Kevin' last month. It took me 15 minutes to clean it up and replace it with a proper debugger in VS Code. Now they can actually see variable values step by step without all the clutter. How do you guys track down bugs without making your code unreadable?
3 comments
Log in to join the discussion
Log In3 Comments
jordancoleman20d ago
My buddy Kevin (not Coding with Kevin, just regular Kevin the electrician) once tried to fix a flickering light in his garage and ended up rewiring the whole breaker box before realizing he just had a bad bulb. Sometimes we overcomplicate stuff before checking the simple thing first.
4