Lists Flashcards
1
Q
List
A
Lists store multiple elements of different data types under the same identifier.
There can be a variable number of elements - they never get full.
It is a data structure which is a sequence
2
Q
Append
A
With .append (), you can add items to the end of an existing list object
3
Q
2D List
A
Where lists are filled with other lists (2D surfaces or records)
4
Q
How do you access an individual list?
A
list = my2DList[4]
To access an individual element, we use this syntax:
list[5][0]
This would get the first element ([0]), of the sixth list ([5]).
5
Q
Individual element?
A
To access an individual element, we use this syntax:
list[5][0]