[PYTHON3] Classes vs Function? | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
0

[PYTHON3] Classes vs Function?

They both do similar things, why use classes over functions and vice versa.

6th Dec 2016, 7:06 PM
-- -- --
1 Answer
+ 3
Functions automate a task, and objects create an instance. So, objects can hold variables and "functions" (called attributes and behaviours respectively).
6th Dec 2016, 10:20 PM
Keto Z
Keto Z - avatar