二次啟航
Piled Higher and Deeper 成長記錄
Pages
Home
Research
Ideas
Life
Technotes
Monday, November 15, 2021
[Python] Python Main Functions
This
article
is very useful:
Four best practices 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().
No comments:
Post a Comment
Newer Post
Older Post
Home
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment