Hello all mentors online,
I'm quite confused about "len(numbers)" on the forth line
May anyone explain more to me how this len() could count the number of scores I put in rather than the decimal of a number?
I remember for a string:
len() is counting it's characters, right?
then for a number like 2533
len("2533") = 4, right?
how could len(numbers) count the amount of scores in the dictionary?
thank you all
def average(numbers): total = sum(numbers) total = float(total) division = total/len(numbers) return division