Introduction to Programming using Python 1st Edition

class ClassName:    initializer    methods
In addition to using variables to store data fields and define methods, a class provides a special method, __init__. This method, known as an initializer, is invoked to initialize a new object’s state when it is created. An initializer can perform any action, but initializers are designed to perform initializing actions, such as creating an object’s data fields with initial values. Python uses the following syntax to define a class: class ClassName:       initializer       methods