Skip to the content.

Where is main() function in a Python script?

import sys

def main():
  return 0
  
if __name__ == "__main__":
  sys.exit(main())

— Oliver Frolovs, 2020