YOU ASKED
Why is my Python loop returning the wrong value?
Here’s the issue.
You’re resetting the counter inside the loop. Move that line above the loop and each iteration will keep its value.
You’re resetting the counter inside the loop. Move that line above the loop and each iteration will keep its value.
Ask a follow-up question ↑