set:
The number of its elements can be modified (adding only elements and it is not possible to delete an element), and their values can be modified, the elements are unordered and have no addresses, meaning that the set can be printed twice and the elements are printed in a different order each time, the values of the elements cannot be repeated in it.
Union, Intersection, Difference and Symmetric Difference are some operations
which are performed on sets.
Union: Union operation performed on two sets returns all the elements from both
the sets. It is performed by using & operator.
Intersection: Intersection operation performed on two sets returns all the element
which are common or in both the sets. It is performed by using | operator.
Difference: Difference operation performed on two sets set1 and set2 returns the
elements which are present on set1 but not in set2. It is performed by using –
operator.
Symmetric Difference: Symmetric Difference operation performed on two sets
returns the element which are present in either set1 or set2 but not in both. It is
performed by using ^ operator.