Z
Zheng Li
def method1(a = None):
print a
i can call it by
method1(*(), **{'a' : 1})
I am just curious why it works and how it works?
and what do *() and **{'a' : 1} mean?
when I type *() in python shell, error below happens
File "<stdin>", line 1
*()
^
SyntaxError: invalid syntax
print a
i can call it by
method1(*(), **{'a' : 1})
I am just curious why it works and how it works?
and what do *() and **{'a' : 1} mean?
when I type *() in python shell, error below happens
File "<stdin>", line 1
*()
^
SyntaxError: invalid syntax