How to use the "__str__" method?
python
Solution
you need an instance of `Time`. e.g. `time1 = Time()` (Notice the parenthesis).
As it is, you are modifying the class, not an instance of the class -- And `__str__` only tells python how to create strings from instances of the class, not the classes themselves...
Problem
I'm diving into some Object Oriented Programming. Unfortunately, I can't even get up to the first step: Converting classes to strings using `__str__`. Here's my code: ``` class Time: def __init__(self, hours = 0, minutes = 0, seconds = 0): self.hours = hours self.minutes = minutes self.seconds = seconds def __str__(self): return "basdfadsg" time1 = Time time1.hours = 3 time1.minutes = 23 time1.seconds = 13 print(time1) ``` Whenever I try: ``` print(time1) ``` it returns: ``` <class '__main__.Time'> ``` What am I doing wrong?