Check the number of parameters passed in Python function

后端 未结 3 1023
春和景丽
春和景丽 2020-12-17 14:58

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
         


        
3条回答
提交回复
热议问题