I\'m new in Python and wants to know if there is a simple way to get amount of passed parameters in Python function.
a(1, 2, 3) ==>3
a(1, 2) ==>2
you could also change the input for your function to a list, so to have a function:
a(your_list)
then to know how many arguments have been passed to the function, you could simply do:
print len(your_list)
However, this means that you change the input type for your function, from many input variables to only one, the list(which can have a variable number of elements).