Python also provides set data structure which does not permit any duplicates. Sets are created using pair of curly braces or a set function.
In this video, I explain about how we can create sets and also explain how we can perform some of the set theory operations from mathematics like union, intersection, difference, etc. Sets can be quite useful when you have a condition where you want to avoid any duplicates. Sets are unordered collection that means they cannot be indexed.
How to Create set in Python [0:37]
Sets are unordered [1:46]
Add or remove elements into Python sets [2:06]
Set theory operations on Python sets [3:52]
Union [3:58]
Intersection [4:30]
Difference operation [5:07]
Symmetric Difference [5:50]
Disjoint Sets [6:34]
Subsets and Superset [7:13]
If you like our content, click on SUBSCRIBE button and click on Bell icon to receive latest and greatest updates of my video lessons.
Follow us on Facebook, Twitter, Instagram
Facebook Link: / techprogrammer1
Twitter Link: / techprogrammer1
Tumblr Blog: https://www.tumblr.com/blog/techprogr...