Lists
Data Structures
- Define data structure.
- Compare and contrast a simple data type like
int
, float
, bool
, etc., and a data structure like list
.
Basics of Lists
- State the defining properties of a
list
.
- Construct a
list
.
- Explain how a list handles construction from variables in terms of later changing the values of the variables used to construct the list.
range()
and len()
- Use
range()
to construct lists of integers.
- Use
len()
to query the length of a list.
Accessing Lists
- Explain the conceptual model for how a
list
is stored in terms of addresses and values.
- Access a specified element of a given
list
.
- Recognize and use Python’s zero-based numbering system for indexing.
- Recognize and use Python’s negative indexing.
Slicing Lists
- Explain the conceptual model for slicing a
list
.
- Access a specified sub-
list
of a given list
using slicing.
- Recognize and use implicit starting and stopping indices in slicing.
- Recognize and use negative indexing in slicing.
- Compare and contrast the objects returned by indexing versus slicing.
append()
and +
- Use append to grow a list.
- Enumerate a given recursive sequence via iteration and store the terms of the sequence in a list.
- Concatenate two or more lists using
+
.