# -*- coding: utf-8 -*- def product(x, *y): result = x for y1 in y: if not isinstance(y1, (int, float)): raise TyprError('Bad operand type: only int or float are allowed.') else: result *= y1 return result
Sign in to make a reply
chengww5217