Discuss / Python / 作业

作业

Topic source
def product(*args):
    if len(args)==0:
        raise TypeError('必须大于1个参数')
    s=1
    for i in args:
        s*= i
    return s


  • 1

Reply