Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import something
- import another thing
- def main():
- bar = foo()
- print("the answer is {}".format(bar))
- def foo():
- return 42
- # this makes sure the main function will only be executed
- # when using your .py file as a script, not when importing
- # it as a module.
- if __name__ == "__main__":
- main()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement