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
Here's my contribution:
def rev(test): test = list(test) i = len(test)-1 result = [] print test while i >= 0: result.append(test.pop(i)) i -= 1 return "".join(result)