List


#1

whats the difference between

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


#2

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.


#3

thank you! prove to be of great help


#4

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