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...
На этой странице сайта вы можете посмотреть видео онлайн Using Python enumerate() With for Loops длительностью часов минут секунд в хорошем качестве, которое загрузил пользователь Real Python 27 Январь 2022, поделитесь ссылкой с друзьями и знакомыми, на youtube это видео уже посмотрели 25,698 раз и оно понравилось 580 зрителям. Приятного просмотра!