DEV Community

Cover image for Learn Python: Sets

Learn Python: Sets

Rishi on May 22, 2020

A set is another type of collection like list and tuple. So what are sets? Sets are unordered – Items stored in a set aren’t kept in any particu...
Collapse
 
waylonwalker profile image
Waylon Walker

Sets are one of my favorite container types. You can do really powerful operations with very little effort, and they are wicked fast at it.

The one thing that I see your missing is the set operators like + * - | ^

Collapse
 
rishiabee profile image
Rishi

Waylon, Thanks!
Will definitely include that in another article about advance features of sets.

Much appreciated. Thanks.

Collapse
 
waylonwalker profile image
Waylon Walker

As much as I like the tersness of the operators, and being able to quickly compare datasets ad-hoc, using the method names can be much more readable and less confusing. Good call to use those. I guess its worth a mention because you will run into them into the wild.

Collapse
 
ben profile image
Ben Halpern

Love the use of replit here

Collapse
 
rishiabee profile image
Rishi

Javier,
Thank for your input, much appreciated.
I'm taking note, I'll definitely add that when I review it.

Again, thanks!