Conceptual inquiry about __main__ in Python
问题 I am currently working with Python and have been confused over the fact that functions are listed in __main__ . I have been looking over multiple python scripts to try to find a common theme as to what functions warrant a place in __main__ , but to no avail. Here I have a sample of my own code. firstfunction and anotherfunction are the only two functions in my code. def main(argv): firstinput="" secondinput="" if len(argv) < 3 or len(argv) > 3: print """"Please set to: metisfinal.main