summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHendrik Jäger <gitcommit@henk.geekmail.org>2023-08-01 16:14:49 +0200
committerHendrik Jäger <gitcommit@henk.geekmail.org>2023-08-01 16:14:49 +0200
commit44911d86569781403c47cd04533b1f17c0bf36f1 (patch)
tree1800e974c8978e5fda9f4b0bf1ecabf9d59da925
parent90b7b91c4597875b929a73392db7357afe039891 (diff)
change function to return greeting, not print directly
-rwxr-xr-xsrc/hello/hello.py5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/hello/hello.py b/src/hello/hello.py
index d56b4ae..a97e848 100755
--- a/src/hello/hello.py
+++ b/src/hello/hello.py
@@ -3,7 +3,8 @@
import sys
def greet(who_to_greet: str):
- print('Hello', who_to_greet)
+ return 'Hello ' + who_to_greet
-greet(sys.argv[1])
+greeting = greet(sys.argv[1])
+print(greeting)