Discuss / Python / 打卡

打卡

Topic source

def product(*args):

    s = 1

    if len(args) == 0:

        raise TypeError

    else:

        for x in args:

            s = s * x

        return s


  • 1

Reply