这样写为什么不行
def average(*args): sum=0.0 if len(args) == 0: return sum for x in args: i=0 sum=sum+x i=i+1 average=sum/i return average
def average(*args): sum=0.0 if len(args) == 0: return sum for x in args: i=0 sum=sum+x i=i+1 average=sum/i return average
2018-09-07
举报