r/PythonLearning • • Oct 09 '26

Do I really need to learn class.

Post image

Both function and class give the same output. So why do I need it?

70 Upvotes

50 comments sorted by

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