Please enable JavaScript to use CodeHS

AP Computer Science Principles in Python

Lesson 7.3 For Loops and Lists

Description

  • A list is a mutable, heterogenous data type that stores an ordered sequence of things.
  • You can convert lists to strings, and strings to lists.
  • You can iterate over lists like you can with strings.
  • A tuple can be stored as one thing in a list.
  • A list can be stored as one thing in a tuple.

Objective

Students will be able to:
* Understand and explain the characteristics of a list.
* Use for loops to go through items in a list.