Python - enumerate() Function and Unpacking an Iterable List- Programming Code Examples - APPFICIAL

Pubblicato il: 29 settembre 2021
sul canale di: Appficial
731
8

A programmer may sometimes need both the current position index and corresponding element value when iterating over a sequence.

The enumerate() function gets both the element’s index and value at the same time

Unpacking performs multiple assignments at the same time, and binds comma-separated names to the elements of a sequence
num1, num2 = [25, 42] is the same the two statements num1 = 25 and num2 = 42

Subscribe to Appficial for more programming videos coming soon. Also, don't forget to click LIKE and comment on the video if it helped you out!


In questa pagina del sito puoi guardare il video online Python - enumerate() Function and Unpacking an Iterable List- Programming Code Examples - APPFICIAL della durata di ore minuti seconda in buona qualità , che l'utente ha caricato Appficial 29 settembre 2021, condividi il link con amici e conoscenti, su youtube questo video è già stato visto 731 volte e gli è piaciuto 8 spettatori. Buona visione!