Lists

Data Structures

  1. Define data structure.
  2. Compare and contrast a simple data type like int, float, bool, etc., and a data structure like list.

Basics of Lists

  1. State the defining properties of a list.
  2. Construct a list.
  3. 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()

  1. Use range() to construct lists of integers.
  2. Use len() to query the length of a list.

Accessing Lists

  1. Explain the conceptual model for how a list is stored in terms of addresses and values.
  2. Access a specified element of a given list.
  3. Recognize and use Python’s zero-based numbering system for indexing.
  4. Recognize and use Python’s negative indexing.

Slicing Lists

  1. Explain the conceptual model for slicing a list.
  2. Access a specified sub-list of a given list using slicing.
  3. Recognize and use implicit starting and stopping indices in slicing.
  4. Recognize and use negative indexing in slicing.
  5. Compare and contrast the objects returned by indexing versus slicing.

append() and +

  1. Use append to grow a list.
  2. Enumerate a given recursive sequence via iteration and store the terms of the sequence in a list.
  3. Concatenate two or more lists using +.