Now that you know the differences between how Python handles the various execution modes, it’s useful for you to know which best practices you can implement. You’ll learn about four best practices you can use to make sure that your code can serve a dual purpose:
- Put most code into a function or class.
- Use
__name__
to control execution of your code. - Create a function called
main()
to contain the code you want to run. - Call other functions from
main()
.
Gregory Klassen on March 10, 2020
Is it tmux or some other terminal setup you use in your presentation?