PYTHON CORE · LESSON 32
Number and element
Function enumerate · about 12 minutes
Learning with progressRead the summary for free. To save the work, log in to the account.
Type the code yourself
Dial the loop with the number and element manually.
colors = ["синий", "зелёный"]
for index, color in enumerate(colors):
print(index, color)Open the editor for class workSolve it yourself
Create pets from «кот» and «пёс». With enumerate, get index and pet; output both via print.
The answer is hidden. Use similar examples from the lesson notes.
Opening up your homework