Question about fixing a broken loop after 2 hours of debugging
I was at my kitchen table last Thursday trying to teach myself Python, and my loop kept skipping the last item in a list, so I added print statements everywhere, and it turned out I was mutating the list while iterating over it. Do you usually debug by printing stuff out or by actually tracing the code on paper? I'm curious which side people land on.