# ! /usr/bin/env python3
# -*- coding:utf-8 -*-
def product(*nums):
if len(nums)==0:
raise TypeError( "No arguments were given !")
#无参数
s=1
for num in nums:
s*=num
return s
Sign in to make a reply
哈塞哈塞咔
# ! /usr/bin/env python3
# -*- coding:utf-8 -*-
def product(*nums):
if len(nums)==0:
raise TypeError( "No arguments were given !")
#无参数
s=1
for num in nums:
s*=num
return s