def mul(*nums): if len(nums) == 0: raise TypeError('请输入参数!') else: s = 1 for n in nums: s = s * n return s
你的代码每次都写得好漂亮~
Sign in to make a reply
向阳