Sets in python

Exploring sets in Python
Exploring sets in Python

Hello friends How are you all?? Hope fine, healthy and safe .”The beginning is always now “so guy’s lets jump towards point 🙂

”A set is a data structure , having unordered, unique and unindexed elements”

Element in set is also called as entries

sets retain unique values

Python set have all the properties and attributes as in mathematical set

All methods are exactly same ie. disjoint, intersection

Their is no duplication in set

Set is mutable means we can add or remove the entries

In sets iterations can de performed using loops

we write elements in sets between two curly brackets and separated with a comma

1)Type set

2)To add elements

3)Intersection in set

4)union in set

5)As know you know how to get min,max,len so let it be here ( max(s), min(s), len(s) ) you can do it if not comment me i will update the article . But first read previous

6) disjoint set A set said to be disjoint set if they have element in common.

7)To remove

Thank you friends “Live a life full of humility , gratitude, intellectual curiosity and never stop learning” till then #happy coding #have fun we’ll meet in next article 🙂 🙂 🙂 🙂 🙂

You may also like...

This site uses Akismet to reduce spam. Learn how your comment data is processed.

%d bloggers like this: