def myreverse2(s): return "" if not s or len(s) == 0 else myreverse2(s[1:]) + s[0] s2 = "1234567899988877654321" print(myreverse2(s2))