The Python Papers

The Python Papers

Share this post

The Python Papers
The Python Papers
Python 101 - Learning About Sets
Copy link
Facebook
Email
Notes
More

Python 101 - Learning About Sets

Mike Driscoll's avatar
Mike Driscoll
Jul 26, 2023
∙ Paid
6

Share this post

The Python Papers
The Python Papers
Python 101 - Learning About Sets
Copy link
Facebook
Email
Notes
More
Share

A set data type is defined as an "unordered collection of distinct hashable objects" according to the Python 3 documentation. You can use a set for membership testing, removing duplicates from a sequence and computing mathematical operations, like intersection, union, difference, and symmetric difference.

Because they are unordered collections, a set doe…

Keep reading with a 7-day free trial

Subscribe to The Python Papers to keep reading this post and get 7 days of free access to the full post archives.

Already a paid subscriber? Sign in
© 2025 Mike Driscoll
Privacy ∙ Terms ∙ Collection notice
Start writingGet the app
Substack is the home for great culture

Share

Copy link
Facebook
Email
Notes
More