enumerate
(
sequence
)
Given a sequence, produces a sequence of pairs of indices and elements (as tuples).
The first element has index 0, unless a different starting index is specified.
sequence
sequence to enumerate
list(enumerate(['Lugano', 'Zürich', 'Lausanne']))
[(0, 'Lugano'), (1, 'Zürich'), (2, 'Lausanne')]
PyTamaro is a project created by the Lugano Computing Education Research Lab at the Software Institute of USI
Privacy Policy • Platform Version ede3c94 (Fri, 23 May 2025 14:43:18 GMT)