Although I've been using python for a while, and a common pattern you see is these two statements:
def main():
# Fancy code here
if __name__ == "__main__":
main()
My question is, why wouldn't you use this pattern instead?
if __name__ == "__main__":
# Fancy code here
Is this just in case you want to import main from another place? Or is there some other reason you might want to do this?