def product(*x): if len(x) == 0: raise TypeError ("Please input mumbers") r = 1 for i in x: if not isinstance(i,(int,float)): raise TypeError ("Only int or float type are expect") r *= i return r
建议大家先花10分钟看看markdown怎么写。。
Sign in to make a reply
快没时间啦