def product(numbers): times=1 if numbers is None: raise TypeError for x in numbers: times=timesx return times print(product(6,1,5))
输入的程序和显示的不同
is None 判断不了的
Sign in to make a reply
独具一格5
def product(numbers): times=1 if numbers is None: raise TypeError for x in numbers: times=timesx return times print(product(6,1,5))