Python Programming - Data Types - Discussion

Discussion Forum : Data Types - General Questions (Q.No. 44)
44.
What is the output of the following code snippet?
my_set = {1, 2, 3, 4, 5}
my_set.remove(3)
print(my_set)
{1, 2, 3, 4, 5}
{1, 2, 4, 5}
{1, 2, 4}
Error
Answer: Option
Explanation:
The remove() method is used to remove a specific element from a set.
Discussion:
Be the first person to comment on this question !

Post your comments here:

Your comments will be displayed after verification.