demo_set_pop.py:
thisset = {"apple", "banana", "cherry"} x = thisset.pop() print(x) #removed item print(thisset) #the set after removal
C:\Users\My Name>python demo_set_pop.py