What is Set Operation in python with Example

Set{} A set is another type of collection data type. A Set is a mutable and unordered collection of elements without duplicates. That means the elements within a set cannot be repeated. A set is created by placing all the elements separated by a comma within a pair of curly brackets { }. Syntax of set: variable={element1,element2,element3} Set Operations As you learned in mathematics, python has also supported the set operations such as Union Intersection Difference Symmetric difference Union ( | ) The union includes all elements in two or more sets. That is all element in the given set is returned … Continue reading What is Set Operation in python with Example