The enumerate and zip functions

for i, x in enumerate([5, 6]): s += i * x → 6

You can also choose a level by clicking its number.

About the course

Description
A loop over pairs – enumerate adds an index to the elements, zip combines two lists
More information
The examples are in Python. Indentation determines what belongs to a loop or a condition.
Sample question
for i, x in enumerate([5, 6]): s += i * x → 6
Author
Jiří Preisler
Version
1.0