Examveda

What is the purpose of the __str__ method in Python classes?

A. It returns a string representation of an object

B. It converts an object to a string

C. It defines a method

D. It removes an attribute

Answer: Option A


Join The Discussion

Related Questions on Concept of Object Oriented Programs in Python