Discuss / Python / 贴答案

贴答案

Topic source

Rayn-S

#1 Created at ... [Delete] [Delete and Lock User]
def product(*xyz):
    if not xyz:
        raise TypeError('参数为空,运算退出')
        return
    multi = 1
    for n in xyz:
        multi = multi * n
    return multi

成功通过所有测试。


  • 1

Reply