def mul(*args): r = 1 if len(args) == 0: raise TypeError('bad operand type') elif len(args) == 1: return args[0] for inx in args: if not isinstance(inx, (int, float)): raise TypeError('bad operand type') r = r * inx return r
Sign in to make a reply
C❤️M