Posted on 10th September 2024|49 views
How to create a python function with optional arguments?
Posted on 10th September 2024| views
We can utilise the parameter of *args, that permits you to transfer as many arguments as you need. For example:
def myfunc(u,v, *args, **kwargs):
for ar in args:
print ar
myfunc(u,v,w,x,y,z)