Set, Set In Python, Python Programming, Data Science, Artificial Intelligence.
"cherry"} print("banana" in set) #Output yes Modify Set Data Type: Adding Items: Once a set is created, you cannot change its items, but you can add new items. i. add() method: Add an item to a set # Creating a set s = {1, 2, 3, 4} # Adding an item to the set s.add(5) print(s) #Output {1,2,3,4,5}