What is CLASS and OBJECT in python ? | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
+ 2

What is CLASS and OBJECT in python ?

More simple way

28th Oct 2019, 9:22 AM
Deepak Rajbhar
Deepak Rajbhar - avatar
2 Answers
+ 4
In object oriented programming, objects are like persons. Like any person which has it's own characteristics and behaviours, objects have their own too. Classes are creators of objects. You can imagine it as parents of a person. Every thing you see in programming is an object indeed. Numbers, data types, plots, graphical widgets and so on. All of them are defined in their own classes.
28th Oct 2019, 9:46 AM
Qasem
+ 1
An object is just like a object in the real world; it has properties, such as that it might be red, and methods, which is what it can do, such as that it can bounce(I'm talking about a red ball here). Properties and methods are coded into a class, which you think of as a collection of code to mass produce an object.
28th Oct 2019, 6:18 PM
Jianmin Chen
Jianmin Chen - avatar