My first Python script ran for 6 hours because I put a print inside a loop
Last Tuesday I finally sat down to automate a boring task at my grooming shop, logging client appointments into a spreadsheet. I followed a YouTube tutorial, wrote maybe 40 lines of Python, and hit run. The terminal just sat there blinking, so I went to lunch, came back, and it was still going. Turns out I had placed a print statement inside a for loop that was reading a 50,000-line CSV file, and every single line was printing to the screen, slowing everything down. I killed it, moved the print outside the loop, and it finished in 4 seconds. I felt dumb, but it taught me more about debugging than any course video. Has anyone else had a simple mistake like that eat up way more time than the actual task? What was your fix?