Python Programming - Data Types - Discussion
Discussion Forum : Data Types - General Questions (Q.No. 59)
59.
What is the output of the following code snippet?
my_set = {1, 2, 3, 4, 5}
result = my_set.discard(3)
print(result)
Answer: Option
Explanation:
The
discard()
method removes the specified element from the set but does not return a value (None
).
Discussion:
Be the first person to comment on this question !
Post your comments here:
Quick links
Quantitative Aptitude
Verbal (English)
Reasoning
Programming
Interview
Placement Papers