diff --git a/s1_a61_2.py b/s1_a61_2.py index c5c9f95..27112f9 100644 --- a/s1_a61_2.py +++ b/s1_a61_2.py @@ -6,8 +6,5 @@ if __name__ == "__main__": # Aufgabe 6.2 s1 = "Hello, World" - tmp = "" - for current_char in range(s1.find(","), -1, -1): - tmp += s1[current_char] - s1 = tmp - print(s1) + s2 = s1[s1.find(","):0:-1] + print(s2)