Found out the hard way that a Python list index starts at zero, not one | Coding For Beginners - Freelance Forum - The Community for Independent Professionals
Found out the hard way that a Python list index starts at zero, not one
I spent about two hours last Tuesday debugging a loop that kept skipping the first item in my grocery list, and it turned out I just didn't know index 0 was a real position. The Python docs page on lists says it right at the top, which I somehow read three times before it clicked. Did anyone else get tripped up by counting from zero when they first started, or was it just me?