Defining a class
A class is a blueprint for objects. The class body declares attributes (the data each instance will hold) and methods (the operations the instance can perform).
class Dog: introduces the class. Inside the body, def bark(self): defines a method. The method gets called on an instance, and the instance is passed in as the first argument by Python automatically.
Classes are the way Python lets you define a new type. Once you have a Dog class, you can build dogs, ask them to bark, store them in lists. The class itself is also an object, just one whose role is to be the template.