Understanding * for Unpacking in Python


Unpack elements from lists or tuples into function arguments or in assignments.

Source Code

numbers = [1, 2, 3]
print(*numbers)  # Equivalent to print(1, 2, 3)
Subscribe
Notify of
guest
0 Comments
Inline Feedbacks
View all comments