My cousin watched me write a for loop and asked why I was typing the same lines over and over
I was showing my cousin in Sacramento the little number guessing game I built after about 3 weeks of learning Python, and I was honestly pretty proud of it. He looked at my code for maybe 10 seconds and asked why I typed the same input lines five times in a row instead of using a loop. I got defensive at first, but he was right, and it took me almost 2 hours to rewrite it with a while loop and a counter. Has anyone else had a total beginner moment like that where something obvious got pointed out to you?
Oh man, I used to copy paste the same block over and over because loops scared me, but watching someone else do it made me finally get why they exist. That two hours of pain was worth it though, right?