When we covered for loops, we showed the example of iterating over a list. This lets you iterate over each element in the list, exposing the element to the for loop as a variable. But what if you want to access the elements in a list, along with the index of the element in question? You can do this using the enumerate() function. The enumerate() function takes a list as a parameter and returns a tuple for each element in the list. The first value of the tuple is the index and the second value is the element itself.
На этой странице сайта вы можете посмотреть видео онлайн 43 Iterating over Lists and Tuples | Python [ COMPLETE COURSE ] длительностью часов минут секунд в хорошем качестве, которое загрузил пользователь Tech Lab 19 Август 2020, поделитесь ссылкой с друзьями и знакомыми, на youtube это видео уже посмотрели 179 раз и оно понравилось 3 зрителям. Приятного просмотра!