python 位置参数,默认参数,可变参数,关键字参数,命名关键字参数

位置参数 是最普通的参数,python解释器将每一个参数根据出如今调用中的顺序,对号入座:html >>> def score(x,y): ...     return x*y ... >>> print(score(1,2)) 2python 多了少了都不行: >>> print(score(1)) Traceback (most recent call last):   File "<stdi
相关文章
相关标签/搜索