Getting the error that an item is not part of list


#1



Though the list is created with the expected items, it throws an error that an item is not part of the list


Replace this line with your code. 

students = ['lloyd','alice','tyler']


#2

they should not be in quotation marks or apostrophes because they are not strings, they're supposed to be variables.


#3

@kyleaw and @chiprockstar83142, i think the quotation marks should be like this ", because they are dictionaries, not variables.


#4

no, you can store a reference to a dictionary i a list:

example_dict = {
   "one": "two"
}
example_list = [example_dict]
print example_list

#5

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