Part of the Whole


#1

Hello All,

For the first line:
is there any different to set up a list?
both of them could pass the exercise, but i'm just curious about it.

students = ["lloyd","alice","tyler"]
&
students = [lloyd,alice,tyler]

students = ["lloyd","alice","tyler"]
def get_class_average(students):
results=[]
for student in students:
results.append(get_average(student))
return average(results)

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


#2

This might be a bug because this,

and this,

are significantly different. So I would suggest you use this method,

students = [lloyd,alice,tyler]


#3

Thank you @designpro98699
but may you tell me more about their differences?


#4

This list,

is just storing 3 strings.

But this list,

is storing the lloyd,alice,and tyler dictionaries.


#5

thank you so much, it's very clear!!


#6

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.