whats the difference between

students = [lloyd, alice, tyler]
students = [“lloyd”, “alice”, “tyler”]


in the first one, you store variables in the list. These variables must be defined, otherwise python will throw an error. In this case, the variable are defined, they are dictionaries containing information on our students

the second line of code, you would just store string in the list. The difference is huge.


thank you! prove to be of great help


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