Puzzle 17: Explanation
Let’s find out how multiple assignments and unpacking works in Python.
We'll cover the following...
Let’s try it!
Try executing the code below to verify the result:
Press + to interact
avengers = ['Bruce', 'Carol', 'Natasha', 'Tony']idx = 3avengers[idx], idx = 'Peter', 2print(avengers)
Explanation
In this exercise, we’re doing multiple ...