Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

python optional arguments

def myfunc(a,b, *args, **kwargs):
      c = kwargs.get('c', None)
      d = kwargs.get('d', None)
      #etc
myfunc(a,b, c='nick', d='dog', ...)
 
PREVIOUS NEXT
Tagged: #python #optional #arguments
ADD COMMENT
Topic
Name
1+9 =