discard()` method :# Create a set
fruits = {"apple", "banana", "cherry"}
# Remove an item using the discard() method
fruits.discard("banana")
# Print the updated set
print(fruits){'cherry', 'apple'}fruits` containing three items: "apple", "banana", and "cherry". We then remove the item "banana" from the set using the `discard()` method. banana" has been removed.