diff options
author | Hendrik Jäger <gitcommit@henk.geekmail.org> | 2023-08-01 16:11:32 +0200 |
---|---|---|
committer | Hendrik Jäger <gitcommit@henk.geekmail.org> | 2023-08-01 16:11:32 +0200 |
commit | 90b7b91c4597875b929a73392db7357afe039891 (patch) | |
tree | c5eb46a1163f1ae5e190594d2a34eb98d5bc4701 /src/hello | |
parent | a704f9961e32135e6d9b6b7dcc432adbec9d9170 (diff) |
change greeting code to be a function
Diffstat (limited to 'src/hello')
-rwxr-xr-x | src/hello/hello.py | 6 |
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]) |