Python, Data Science, Data Engineering, Programming, Coding.
when we constantly want to check if an item is in the set or not. Also, sets can be used when we want to perform group operations on multiple sets like union, intersection, difference, and symmetric difference. Set Operations & Time Complexity Basic Operations # Creating a set set1 = {1,2,3,4,5}