Manage a sequence of data by using Python lists

Beginner
Developer
Visual Studio

Learn how to use lists to manage a collection of data. Use helper functions to manipulate the list. Use the for statement to iterate through the list.

Learning objectives

In this module, you will:

  • Create lists of related data.
  • Get an item or a subset of items from a list by using indexes and slices.
  • Add and remove items from a list.
  • Use helper functions for other list-related actions.
  • Iterate through a list by using the for iteration statement.

Prerequisites

  • A local Python development setup where you can create a working folder for your code, add code files, and execute those code files from the command line or your code editor.
  • Understanding of how to work with variables, data types like str and int, and so on.
  • Familiarity with importing the random module and with how to call functions like randint() from the module.