Discuss / Python / zuoye

zuoye

Topic source

伏瑞斯

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

def mul(*numbers):

    if len(numbers)==0:

        raise TypeError('无效')

    else:

        sum=1

        for a in numbers:

          sum=a*sum

        return sum


  • 1

Reply