运行后答案应该是0 为什么是99 呢?
def func(L):
if isinstance(L,list):
result=0
for item in L:
if isinstance(item,int)or isinstance(item,float):
result=result+item
return result
elif isinstance(L,tuple):
suj=1
for item in L:
if isinstance(item,int)or isinstance(item,float):
suj=suj*item
return suj
else:
return None
L=(99,0.36,54,69,584,478,6913,51,0,1,33,256,89)
print(func(L))