In Python everything is an object. An object has zero or more methods.
Thus far you have already worked with objects. Let’s take an example:
s = [1,2,3,4]
In the above example, we have an object named s (a list). This object has the methods reverse(), append() and remove().
To create new types of objects, we must define a class.
products = 
print('Shopping list created')
def add(self, name):
groceries = ShoppingList()
We create an object named groceries, of the type ShoppingList.
We then use the methods add() and show().
We also defined a class named ShoppingList which has these methods defined.
We create an object of the type car, named superCar. The superCar object has one method drive().
In addition to the the __init__ method (also called constructor) that is called when you create new objects.
superCar = Car()