← Reference

dunder-methods

Python dunder-methods reference.

__str__

The __str__ method in Python returns a human-readable string representation of an object. Learn how to implement it with examples.

def __str__(self)