Python Programming - Polymorphism - Discussion
Discussion Forum : Polymorphism - General Questions (Q.No. 49)
49.
In Python, what is the purpose of the
__contains__()
method?
Answer: Option
Explanation:
The
__contains__()
method is used to customize the behavior when an item is checked for membership using the in
keyword, allowing for polymorphic behavior.
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