CS: Lists in Python Flashcards
1
Q
What is a list?
A
A collection of data.
2
Q
How is a list structured? Give an example.
A
listName = [element1, element2, element3]
3
Q
What is a list called that has no elements?
A
An empty list.
4
Q
Each element in a list has an…
A
Index.
Ex: friends[0]=”Layna”
0 is the index.
5
Q
A