标签:ret return ota tween ber hat must can between
在python函数中,
可以使用如下方式声明并初始化参数
def to_smash(total_candies, n_friends=3):
"""Return the number of leftover candies that must be smashed after distributing
the given number of candies evenly between 3 friends.
>>> to_smash(91)
1
"""
return total_candies%n_friends
在此函数中,默认参数是3
标签:ret return ota tween ber hat must can between
原文地址:https://www.cnblogs.com/zhichun/p/11441499.html