sum 写在for里面为什么答案不对?
def average(*args): if len(args)== 0: return 0.0 for x in args: sum = 0.0 sum = sum + x return sum / len(args)
def average(*args): if len(args)== 0: return 0.0 for x in args: sum = 0.0 sum = sum + x return sum / len(args)
2018-06-21
举报