Hint: You can adjust the default video playback speed in your account settings.
Hint: You can set your subtitle preferences in your account settings.
Sorry! Looks like there’s an issue with video playback 🙁 This might be due to a temporary outage or because of a configuration issue with your browser. Please see our video player troubleshooting guide to resolve the issue.

Python Basics: Lists and Tuples (Overview)

Python lists are similar to real-life lists. You can use them to store and organize a collection of objects, which can be of any data type. Instead of just storing one item, a list can hold multiple items while allowing manipulation and retrieval of those items. Because lists are mutable, you can think of them as being written in pencil. In other words, you can make changes.

Tuples, on the other hand, are written in ink. They’re similar to lists in that they can hold multiple items, but unlike lists, tuples are immutable, meaning you can’t modify them after you’ve created them.

In this video course, you’ll learn:

  • What lists and tuples are and how they’re structured
  • How lists and tuples differ from other data structures
  • How to define and manipulate lists and tuples in your Python code

By the end of this course, you’ll have a solid understanding of Python lists and tuples, and you’ll be able to use them effectively in your own programming projects.

This video course is part of the Python Basics series, which accompanies Python Basics: A Practical Introduction to Python 3. You can also check out the other Python Basics courses.

Note that you’ll be using IDLE to interact with Python throughout this course.

Download

Sample Code (.zip)

20.1 KB
Download

Course Slides (.pdf)

8.9 MB

00:00 Welcome to this Python Basics course about tuples and lists.

00:05 You’ve learned about a bunch of fundamental data types at this point. You’ve learned about strings, integers, and floating-point numbers, for example. But what if you want to describe a collection of elements?

00:17 How do you combine several fundamental data types into something that’s more complex? Or, from another perspective, what if you have a bunch of lonely elements?

00:27 I mean, elements, don’t you just want to hug them all together? Hmm. Well, there are certain data structures in Python that can model such a collection of data.

00:38 For example, a list of numbers. You can have student names that are enrolled in a class or a row in a spreadsheet, or similarly, a record in a database, or of course, all your favorite animal emojis. Woof!

00:53 In this course, you’ll learn how you can work with tuples and lists, when you want to use which of these two collections, as well as what mutability is and why it’s important to think about it.

01:04 Currently, you’re in the overview of this course. You’ll then move on to tuples, then lists, and then we’ll wrap up the course with a summary To expand on this table of contents a bit, on this slide, you can see all the many topics that you’re going to cover, first about tuples and then about lists.

01:25 Now, there’s a little bit of background, which is that I’ll be using IDLE in this course. If you’re following along with the Python Basics series, then you’re already familiar with this tool.

01:33 If not, then here on this slide, you can see a couple of additional resources that you can use to study up on IDLE if you want to, but you don’t need to know anything about IDLE.

01:42 You can work through this course with any code editor or REPL session that you want to.

01:50 And that’s it for the overview. So next, let’s get started learning about tuples.

alvesmig on Jan. 24, 2024

Hello,

Does this course belong to the learning path:

Python Basics: Introduction to Python

I am asking because I think this course should belong to this learning path, but it doesn’t appear in its description.

Best regards, Miguel

Bartosz Zaczyński RP Team on Jan. 24, 2024

@alvesmig That’s right! Thank you so much for flagging it, Miguel. This video course should now appear in the corresponding learning path.

alvesmig on Jan. 24, 2024

You’re welcome.

Become a Member to join the conversation.