Before we know about object-oriented programming, we need to know what object-oriented is. It can be said in general that all things in the world are objects, and since they are objects, different objects have different properties. However, objects with the same or similar attributes can be grouped together and sorted. So we can also say that everything in the world can be categorized. And as long as the object, it must belong to a category, there must be attributes.
Understanding the object-oriented, we next understand object-oriented programming (also known as OPP programming)
Object-oriented programming uses "classes" and "" objects to create various models to achieve a real-world description.
What are the benefits of object-oriented versus process-oriented programming? My understanding is that
1. Object-oriented partitioning of objects into a single class, with properties and methods in the class, we can write some of the repetitive code we use throughout our program as a method in a class that simplifies the code and makes your code look concise (and Python's philosophy).
2. After our code is written out, it is not used once to throw away, but can be reused, since it can be used repeatedly, then we need to change repeatedly, here
Object-oriented programming of Python