Python Lists

Building on the Python Data Types: Integers, Floats, Strings lesson, you’ll continue to develop your Python programming skills by learning how to work with lists in Python, as well as the basics and syntax of Python for loops to analyze data so you can use Variables, Data Types, and Lists in Python.

In this lesson, you’ll learn about a common data structure in Python—a list—to organize your data and make it easily retrievable. You’ll also learn how to index a list, slice a list, retrieve data from a list, and employ lists of lists. Explore one of the most prevalent methods of organizing data: arranging data by rows and columns into tables, and how to model that in Python.

After you’ve finished this lesson, you’ll feel more confident in your Python programming ability. If you feel like you need practice, think of something you can create using what you’ve learned so far—it doesn’t have to be big; it can be something small, like a calculator. Or if you feel like you need more practice with Python lists (it’s a tough concept to grasp), check out this tutorial explaining the basics of lists in Python.

Objectives

  • Learn how to employ lists in Python
  • Learn how to index and slice lists
  • Learn how to retrieve values from lists
  • Learn how to employ lists of lists in Python

Lesson Outline

  1. Storing Row Elements into Variables
  2. Storing Rows as Lists
  3. List Length
  4. List Indexing
  5. Retrieving Values from Lists
  6. Negative Indexing
  7. Retrieving Multiple List Elements
  8. List Slicing
  9. List of Lists
  10. Retrieving from List of Lists
  11. Review
  12. Takeaways

Get started for free

No credit card required.

Or With

By creating an account you agree to accept our terms of use and privacy policy.