From the course: Certified Entry-Level Python Programmer (PCEP-30-02) Cert Prep
Unlock the full course today
Join today to access over 24,800 courses taught by industry experts.
Introduction to data collections - Python Tutorial
From the course: Certified Entry-Level Python Programmer (PCEP-30-02) Cert Prep
Introduction to data collections
- [Instructor] It's time to talk about data collections. In Python, we have a lot of data collections available, and we're going to cover just the most important ones. We have a list, tuples, sets, dictionaries, and, strings? Why do I have strings in the data collection list? Well actually, a string is a collection, it's is a sequence of characters. And it can also be treated as a collection. And most of the functions and methods that we will use in this chapter will also be appliable to strings. Let's start talking about the list. The list is a sequence of values of any type. They don't need to be of the same type. So you can have a list with one integer, one float, two strings, and one bool. A list is mutable. That means that we can change it. We can add elements, we can remove elements, and edit elements, or change their contents. Every list includes elements. Those elements have a numeric index. The index is just a…
Practice while you learn with exercise files
Download the files the instructor uses to teach the course. Follow along and learn by watching, listening and practicing.