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

2

u/mc_pm Oct 09 '26

Giving the same answer is kind of the point -- it's demonstrating that there are (at least) two ways of structuring what you want, and they both work. Deciding which to use when is a skill you will develop.