There is no main method in Python. It is a procedural language with OO pretensions. So when you run a program: "python path/to/program.py", Python simply starts at the first executable statement in the file and works down.
Common practice, however, even when not using Python in OOP mode is to put the bulk of the procedural code in a function and then have the option to execute that function like so:
This technique is especially useful if you have a program module that's normally invoked from somewhere else, but you want to be able to run it independently as a
unit test.
The secret of how to be miserable is to constantly expect things are going to happen the way that they are "supposed" to happen.
You can have faith, which carries the understanding that you may be disappointed. Then there's being a willfully-blind idiot, which virtually guarantees it.