From 44911d86569781403c47cd04533b1f17c0bf36f1 Mon Sep 17 00:00:00 2001 From: Hendrik Jäger Date: Tue, 1 Aug 2023 16:14:49 +0200 Subject: change function to return greeting, not print directly --- src/hello/hello.py | 5 +++-- 1 file 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) -- cgit v1.2.3