Python Programming - Tuples - Discussion

Discussion Forum : Tuples - General Questions (Q.No. 27)
27.
Which method is used to remove all occurrences of a specific element from a tuple?
tuple.remove_all(element)
tuple.clear(element)
tuple.removeAll(element)
tuple = tuple.replace(element, ())
Answer: Option
Explanation:
Assigning the result of replace() with an empty tuple removes all occurrences of the specified element.
Discussion:
Be the first person to comment on this question !

Post your comments here:

Your comments will be displayed after verification.