Python Programming, Python Data Structures, Oop Concepts, Learn Python, Python Interview.
in a collection or not. # Creating a set fruits = {'apple', 'banana', 'orange'} # Checking if an item is in the set print('apple' in fruits) # Output: True # Adding an item to the set fruits.add('grape') # Removing an item from the set fruits.remove('banana') # Printing the entire set print(fruits)