I came across a strange Codecademy exercise that required a function that would take a string as input and return it in reverse order. The only problem was you could not use
Not very clever, but tricky solution
def reverse(t): for j in range(len(t) // 2): t = t[:j] + t[- j - 1] + t[j + 1:- j - 1] + t[j] + t[len(t) - j:] return t