A class can have attributes (sometimes called variables).
Objects created from a class have all of the parent classes variables.
This allows us to do Object Orientated Programming: we speak about (albeit) virtual objects. Those objects can have unique properties.
Related course: Complete Python Bootcamp: Go from zero to hero in Python 3
Start with a class that has variables.
Create a class product:
Create an object. Then you can set the objects variables:
pancake = Product()
You can create multiple objects from a class. Each object has unique values for the variables.
cookies = Product()
Those objects can be used in your program. You can use an objects variables:
You can use a class its constructor to set the objects variables on creation: