From the course: Advanced Python (2018)
Unlock the full course today
Join today to access over 24,000 courses taught by industry experts.
Advanced collections overview - Python Tutorial
From the course: Advanced Python (2018)
Advanced collections overview
- [Instructor] Python ships with a basic set of data types for working with collections of data, and you've probably already used some or all of these in your work at some point. In this chapter, we're going to learn about some of the more specialized and useful collection data types, and how they build on the basic types to help solve different kinds of programming problems. So as a quick refresher, recall that Python has four basic collection data types. There's the list, which is a sequence of data types and is declared using square brackets with each data item separated by a comma. A close relative of lists are tuples, which are defined with parentheses, and are also comma separated. However, lists can be changed once they are created because they are mutable, whereas tuples are not. Next is the set, which is an unordered collection of distinct values, defined using curly braces, and like lists, sets can be changed once they're created because they're mutable. And finally is the…
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.