<AptiCode/>

Question 496: What is the purpose of the__str__method?

tcs
wipro
infosys
general
aptitude
classes

The__str__method is called when thestr()function is used on an object. It is used to provide a human-readable string representation of the object.