What does *tuple and **dict mean in Python? [duplicate]
In a function call *t means “treat the elements of this iterable as positional arguments to this function call.” def foo(x, y): print(x, y) >>> t = (1, 2) >>> foo(*t) 1 2 Since v3.5, you can also do this in a list/tuple/set literals: >>> [1, *(2, 3), 4] [1, 2, 3, 4] **d means … Read more