I am a Python beginner, I started learning Python two weeks ago. In the first lecture, the professor explains the main()
function; however, I didn’t get it. I have two questions:
-
What does the
main
function do? -
Why can’t I just go back to the beginning of my program and define any function I want to use without writing a main function?
I tried searching on Google for answers; however, I didn’t find anything useful.