Created
September 22, 2016 21:23
-
-
Save thiagorider/af58c2aea762ec5fdbd20f903d67fe8f to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/usr/bin/python3 | |
| def main(): | |
| print("This is the main function") | |
| test() | |
| def test(): | |
| print("This is a test") | |
| if __name__ == "__main__": main() |
Author
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Allow us to define functions after they are called
It allows this only to only be run when this file is called as the main module. It won't run when the module is included in other modules.