Python vs. Java - Main method
Let’s put the Java and Python codes side-by-side to compare them (You can click on the image for a larger version)
Firstly, there is no need to define a class or a main method in Python.
You can also name the Python script to whatever you want (ending with .py).
When you run a Python script, everything that’s not defined in a function or class will be executed.