0

Class and Objects in Python

When do you need to use classes? Please, I need a very simple answer.

21st Sep 2019, 7:17 PM
David Afeke
David Afeke - avatar
2 Answers
+ 1
Because they make everything much easier, you'll understand that yourself once you start making some projects. I used to not line oop, but now I try to use it as much as possible!
21st Sep 2019, 7:41 PM
Aymane Boukrouh
Aymane Boukrouh - avatar
+ 1
Well, to answer this question you have to think in what you gain by using Object Oriented Programming. It will give you Encapsulation, Abstraction, Inheritance and Polymorphism. (If you what to know more about those concept check out the courses section.) So the short answer would be: "Use Classes when your project benefits of one of those concepts!"
21st Sep 2019, 7:57 PM
Ulisses Cruz
Ulisses Cruz - avatar