Run ❯
Get your
own Python
server
❯
Run Code
Ctrl+Alt+R
Change Orientation
Ctrl+Alt+O
Change Theme
Ctrl+Alt+D
Go to Spaces
Ctrl+Alt+P
class Person: def __init__(self, age): self.age = age def __str__(self): return self.age p1 = Person(36) print(p1)
Traceback (most recent call last):
File "demo_magic_str_error.py", line 10, in <module>
print(p1)
TypeError: __str__ returned non-string (type int)