In this course, you’ll learn about sets. They’re a useful data structure that allows you to do some complex operations more easily. They come up everywhere in the real world and are important to understand.
By the end of this course, you’ll know:
00:00 Hi, my name is James. Today you’ll be learning about sets. In Section 1, you’ll get an introduction to sets and learn “What is a set?”, immutable versus hashable, and how to define a set in Python. In Section 2, you’ll learn different ways to operate on a set. For example, how to get the length of a set, how to check membership, and iterate through a set.
00:20 You’ll also learn how to get the union, intersection, and difference of sets; how to check if a set is disjoint of another set; and how to check if a set is a subset or a superset of another set.
00:33 In Section 3, you’ll learn different ways to modify a set. You’ll learn how to add, remove, discard, pop, and clear. You’ll learn different update methods, such as .intersection_update()
and .difference_update()
.
00:46 And you’ll learn how augmented assignment works for sets. In Section 4, you’ll learn about frozen sets and conclude on why we care about sets. So, frozen sets and augmented assignment, which work differently for frozen sets than they do for regular sets.
01:04 You,’ll also learn “Why sets?” and run through a speed test comparing sets with lists and tuples. So, let’s get started with defining “What is a set?”
Course Contents
Sets in Python (Overview) 01:16
Immutable vs. Hashable 03:14
Defining a Set in Python 02:11
Length, Membership, and Iteration 03:07
Union, Intersection, and Difference 06:49
Disjoint, Subset, and Superset 05:37
Add, Remove, Discard, Pop, and Clear 02:44
Different Update Methods 05:56
Augmented Assignment (Sets) 01:32
Augmented Assignment (Frozen Sets) 01:28
Sets in Python (Quiz) 08:30
Sets in Python (Summary) 03:11
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4