这整段代码啥意思?求大神解释
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