Please enable JavaScript to use CodeHS

CodeHS Glossary


Unpacking Python

Unpack some variables from a list.

my_list = [0, 1, 2]
print my_list # prints [0, 1, 2]
x, y, z = my_list
print x + y + z  # prints 3