def average(*args):
sum = 0
if len(args) == 0:
return sum
for item in args:
sum += item
avg = sum / len(args)
return avg
里面的sum+=item跟sum=sum+item有什么区别呢?
sum+=item跟sum=sum+item是一样的,只是写法不同
感觉没区别捏