Contribute Media
A thank you to everyone who makes this possible: Read More

Defining a main function in Python

Description

How can you setup a main function in Python? And should you? Python doesn't know about main functions, but there's nothing stopping us from defining a function called main that we only call when running from the command-line.

Details

Improve this page