python tostring method for class code example Example: python class tostring def __str__(self): return "foo"