In Python, a for loop is usually written as a loop over an iterable object. This means that you don’t need a counting variable to access items in the iterable. Sometimes, though, you do want to have a variable that changes on each loop iteration. Rather than creating and incrementing a variable yourself, you can use Python’s enumerate() to get a counter and the value from the iterable at the same time!
This is a portion of a longer course.
Click here for more info about the complete course: https://realpython.com/courses/loopin...
On this page of the site you can watch the video online Using Python enumerate() With for Loops with a duration of hours minute second in good quality, which was uploaded by the user Real Python 27 January 2022, share the link with friends and acquaintances, this video has already been watched 25,698 times on youtube and it was liked by 580 viewers. Enjoy your viewing!