Getting the error that an item is not part of list


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']


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


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


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

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


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