Bug in my Python loop took 7 hours to find and it was one indented line
I was writing a simple number guessing game in Python two weeks ago and my loop kept running forever no matter what number I typed. I stared at the logic for hours, rewrote the whole thing twice, and even reinstalled Python thinking something was broken. Turns out one line inside my if statement was indented with spaces while the rest of the file used tabs, so the break command was sitting outside the if block. Seven hours for a tab versus space mix up in a 30 line script. Has anyone else had their editor hide this stuff until you turn on invisible characters?