Question #720

What is the output of the code snippet below?
my_set = {1, 2, 3}
my_set.discard(4)
print(my_set)

The set discard() method does not throw an exception if the item to be discarded is not present in the list. (w3schools.com/python/ref_set_discard.asp)


Comment on Disqus:

Question difficulty: 🔵🔵🔵🔵🔵


Similar questions: