A Professional’s Tutorial to Python Lists

Lists, a fundamental Python data structure

Adam Ross Nelson
7 min readSep 17, 2023

--

For an overview of these tutorials, click here (or click the image).

Welcome to second, in a series of tutorials that teach beginner Python specifically for aspiring data scientists. For an overview of these tutorials, click here.

Introduction

In our daily lives, we frequently utilize lists to bring order to chaos.

  • A list for groceries might remind us to buy milk, eggs, and bread.
  • A to-do list might prioritize tasks for the day.
  • A recipe list breaks down ingredients for a delectable dish.

These everyday lists, essentially, are linear collections of items that serve to guide our actions or jog our memories.

A Python list, at a high level, can be thought of in a similar manner — it’s a linear collection of items. However, the analogy begins to diverge sharply when we examine the intricacies and capabilities of Python lists.

A list of items to do written on yellow office paper.
Image Credit: Author’s illustration created in Canva.com.

Here are some more thoughts on how to think (🤔 💭 🧐 ) about Python lists.

  • Firstly, while our everyday lists typically follow a theme or purpose…

--

--

Adam Ross Nelson

Ask about my free career course. I mentor new (💫) and aspiring data scientists enter (🚪) and level up (📈) in the field.