From 90b7b91c4597875b929a73392db7357afe039891 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Hendrik=20J=C3=A4ger?= Date: Tue, 1 Aug 2023 16:11:32 +0200 Subject: [PATCH] change greeting code to be a function --- src/hello/hello.py | 6 ++++-- 1 file 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]) -- 2.39.2