Exerpad
Exercise 6 · Chapter: SetsRequired+50 XP

Fix the Remove

This program tries to remove "mango" from a set, but mango isn't in the set so it crashes! Fix it so it doesn't crash.

Expected output:

3
Need a hint?
3 available · costs 5 XP each
python
fruits = {"apple", "banana", "cherry"}
fruits.remove("mango")
print(len(fruits))
Output
Run your code to see the output here.