Git-Presentation/code-examples/python-merged.py
2020-06-13 00:07:22 +01:00

20 lines
317 B
Python

#!/usr/bin/env python
import sys
def cat():
print("Meow")
def dog():
print("Woof")
def main():
if len(sys.argv) > 1 and sys.argv[1] == "cat":
cat()
elif len(sys.argv) > 1 and sys.argv[1] == "dog":
dog()
else:
print("HELLO WORLD")
if __name__ == "__main__":
main()