Source Code:
(back to article)
class MyClass: def __init__(self, value): self.value = value def __str__(self): return str(self.value) obj = MyClass(10) print(obj) # wird "10" ausgeben
Result:
Report an issue