r/PythonLearning • u/Objective-Remove-632 • Oct 09 '26
Do I really need to learn class.
Both function and class give the same output. So why do I need it?
70
Upvotes
r/PythonLearning • u/Objective-Remove-632 • Oct 09 '26
Both function and class give the same output. So why do I need it?
View all comments
Show parent comment
1
u/MistakeIndividual690 Oct 09 '26
You also want the date/time of the event as part of the class. As it is, it just prints now() but that’s key information that belongs in an event class