43 Iterating over Lists and Tuples | Python [ COMPLETE COURSE ]

Publicado em: 19 Agosto 2020
no canal de: Tech Lab
179
3

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.


Nesta página do site você pode assistir ao vídeo on-line 43 Iterating over Lists and Tuples | Python [ COMPLETE COURSE ] duração hora minuto segundo em boa qualidade , que foi baixado pelo usuário Tech Lab 19 Agosto 2020, compartilhe o link com seus amigos e conhecidos, no youtube este vídeo já foi visto 179 vezes e gostou 3 espectadores. Boa visualização!