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