I have this problem on my study guide that calls for a function that gets the average of two dimensional lists and prints them as one list. I don't really have experience messing with two dimensional lists therefore have no clue where to even begin attacking this problem.
example of what it should do:
avrg([[85, 23, 45], [66, 75, 54], [85, 54, 70], [34, 10, 0]])
[51.0, 65.0, 162.333333333334, 14.66666666666667]
my coding:
def avrg(L):
for i in range(len(L)):
for j in range(len(L[0])):
L[i][j] / i
return L
Where in my coding did I go wrong?