2021年3月26日星期五

Define a function with compulsory and optional arguments

How do I define a function like:

def myfunc(a,b,c,d,e):          #c,d,e are optional          gt = somefunc(a,b)  

Then, only if I want, I will pass values for c,d and e and call them with the function. I don't want them having any default values either. Only if I want, I will pass them and they should accordingly within the function. Is this Feasible? How? Do help me guys. Thanks in advance.

https://stackoverflow.com/questions/66828003/define-a-function-with-compulsory-and-optional-arguments March 27, 2021 at 12:28PM

没有评论:

发表评论