Discuss / Python / #

曹立璋

#1 Created at ... [Delete] [Delete and Lock User]
#未修改
def product(x, y):
    return x * y
#for循环
def product(x,*y):
    for i in y:
        x*=i
    return x
#while循环
def product(x,*y):
    i=len(y)
    while i>0:
        i-=1
        x*=y[i]
    return x

  • 1

Reply