pythonclassobjectoop

What is the difference between objects and classes in Python?


I encountered a text saying:

... classes and objects ....

I was wondering what is the difference between objects and classes in python? I thought all classes are objects, but in that case, author wouldn't have used phrase "classes and objects".


Solution

  • These are two closely related terms in object oriented programming. The standard meaning is that an object is an instance of a class.