Answers for "__str__python"

1

__str__python

The __str__ method in Python represents the class objects as a string – it can be used for classes. 
This method is called when print() or str() function is invoked on an object. This method must return the String object.
Posted by: Guest on March-01-2022

Browse Popular Code Answers by Language