How can you produce the following list with range() in Python?
range()
[9, 8, 7, 6, 5, 4, 3, 2, 1, 0]
Using without [::-1] or reversed -
def reverse(text): result = [] for index in range(len(text)-1,-1,-1): c = text[index] result.append(c) return ''.join(result) print reverse("python!")