]> git.netwichtig.de Git - user/henk/code/python/learn_python.git/blobdiff - src/hello/hello.py
change greeting code to be a function
[user/henk/code/python/learn_python.git] / src / hello / hello.py
index debf6e1dc14b431d86274b9e79b3ad585a2aa6ac..d56b4ae500724c5c1986a11a3e9f8f9dcc34a6a9 100755 (executable)
@@ -2,6 +2,8 @@
 
 import sys
 
-who_to_greet = sys.argv[1]
+def greet(who_to_greet: str):
+    print('Hello', who_to_greet)
 
-print('Hello', who_to_greet)
+
+greet(sys.argv[1])