What does a class's __init__() method do?
__init__()
It initializes any imports you may have included at the top of your file. Example:
class test: def __init__(self): print('I came here without your permission lol') pass t1 = test() >>> 'I came here without your permission lol'
It is a method that acts as a constructor and is called automatically whenever a new object is created from a class. It sets the initial state of a new object.
It is included to preserve backwards compatibility from Python 3 to Python 2, but no longer needs to be used in Python 3.
It makes classes aware of each other if more than one class is defined in a single code file.