You’ll learn about four best practices you can use to make sure that your code can serve a dual purpose:

  1. Put most code into a function or class.
  2. Use name to control execution of your code.
  3. Create a function called main() to contain the code you want to run.
  4. Call other functions from main().

#python #programming

Best Practices for Python Main Functions
13.45 GEEK