CS: Lists in Python Flashcards

1
Q

What is a list?

A

A collection of data.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

How is a list structured? Give an example.

A

listName = [element1, element2, element3]

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

What is a list called that has no elements?

A

An empty list.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

Each element in a list has an…

A

Index.
Ex: friends[0]=”Layna”
0 is the index.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q
A
How well did you know this?
1
Not at all
2
3
4
5
Perfectly