Post
Python
Posted on 19th April 2024|46 views
How to create a python function with optional arguments?
Posted on 19th April 2024
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)
STILL GOT QUERIES?