summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHendrik Jäger <gitcommit@henk.geekmail.org>2023-08-01 16:11:32 +0200
committerHendrik Jäger <gitcommit@henk.geekmail.org>2023-08-01 16:11:32 +0200
commit90b7b91c4597875b929a73392db7357afe039891 (patch)
treec5eb46a1163f1ae5e190594d2a34eb98d5bc4701
parenta704f9961e32135e6d9b6b7dcc432adbec9d9170 (diff)
change greeting code to be a function
-rwxr-xr-xsrc/hello/hello.py6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/hello/hello.py b/src/hello/hello.py
index debf6e1..d56b4ae 100755
--- a/src/hello/hello.py
+++ b/src/hello/hello.py
@@ -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])