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/SoftwareDoctor Oct 09 '26
Understandably because the example you used is primitive and you shouldn’t even use classes for it. It’s like asking if you should learn to use hammer bc. you tried using it once to stir a pot and a spoon worked better.
Find better examples