#Function Argument unpacking
def myfunc(x, y, z):
print(x. v. z)
tuple_vec = {1, 0, 1)
dict_vec = {'x':1, 'y':0, 'z':1}
myfunc(*tuple_vec)
myfunc(*dict_vec)
It returns following error
File "func.py", line 8
tuple_vec = {1, 0, 1)
^
SyntaxError: invalid syntax
How did i solve it?
_______________________________________________
Tutor maillist - [email protected]
To unsubscribe or change subscription options:
https://mail.python.org/mailman/listinfo/tutor
