set
A set in Python is an unordered, mutable collection of unique elements. It does not allow duplicate values and is commonly used for mathematical set operations like union, intersection, and difference. Key Characteristics of Sets: ✅ Unordered – Elements do not maintain a specific order. ✅ Mutable – You can add or remove elements. ✅ Unique Elements – No duplicate values allowed. ✅ No Indexing – Cannot access elements using an index. # Creating sets number = {1, 2, 3, 4, 5} print(number) print(type(number)) # Sets ignore duplicate values newnumber = {1, 2, 3, 4, 5, 4, 3, 2, 2, 1, "tt"} print(newnumber) # Adding an element newnumber.add("Praveen") print(newnumber) # Merging two sets thisset = {"apple", "banana", "cherry"} tropical = {"pineapple", "mango", "papaya"} thisset.update(tropical) print(thisset) # Merging a list into a set thisset = {"apple", "banana", "cherry"} mylist =...