Discuss / Python / 打卡

打卡

Topic source

Tim_Ho_

#1 Created at ... [Delete] [Delete and Lock User]

def product(*arg):

    if len(arg) == 0:

        raise TypeError('No arguments given!')

    product = 1

    for x in arg:

        product *= x

    return product


  • 1

Reply