Created
March 24, 2025 23:14
-
-
Save acbart/ca120227dc3ff75942a7cec8a08c93eb to your computer and use it in GitHub Desktop.
Example Python Scripts
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
python simple_python_utility.py |
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
import simple_python_utility | |
simple_python_utility.main() |
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
# This file does nothing on its own, if your run or import it. | |
def do_something(): | |
print("Hello world!") | |
# A lot of folks like to define a main function | |
def main(): | |
do_something() | |
# Because I properly guarded its main | |
if __name__ == "__main__": | |
main() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment