?
What is the purpose of the __str__() method in Python classes?
Answer & Solution
Correct Answer:
Option
B
The __str__() method defines the string representation of an object, often used with the str() function.
Join the Discussion
Login to post a comment or share your explanation.
Login