以下代码中的 return None 包含 元组元素为0 的情况么?
# -*- coding:utf-8 -*-
def func(param):
if isinstance(param, list):
result = 0
for item in param:
if isinstance(item, int) or isinstance(item, float):
result += item
return result
elif isinstance(param, tuple):
result = 1
for item in param:
if isinstance(item, int) or isinstance(item, float):
result *= item
return result
return None