get_class_average([alice]) resulted in an error


#1

def get_class_average(students):
results=[]
for student in students:
results.append[get_average(student)]
return average(results)

But still facing issue : Oops, try again. get_class_average([alice]) resulted in an error: 'builtin_function_or_method' object has no attribute 'getitem'


8. Part of the Whole
#2

append is a function, not a list. It has no subscript, only a parameter list.

results.append(get_average(student))

#3

thanks :slightly_smiling: