From a0834f1f971e3a74c5445a9fa2d009b805b8171d Mon Sep 17 00:00:00 2001 From: Timo Wenz <2025014@stud.hs-mannheim.de> Date: Tue, 3 May 2022 20:04:16 +0200 Subject: [PATCH] Aufgabe 6 verbessert --- python/s1/s1_a61_2.py | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/python/s1/s1_a61_2.py b/python/s1/s1_a61_2.py index 0ad379a..7ef9a81 100644 --- a/python/s1/s1_a61_2.py +++ b/python/s1/s1_a61_2.py @@ -2,8 +2,5 @@ s = "This is a test" new_s = s.replace(' ','-') print(new_s) -s1 = "Hello, World" - -s1split = s1.split(",") - -print(''.join(reversed(s1split))) \ No newline at end of file +txt = "Hello, World" [-7::-1] +print(txt) \ No newline at end of file