What I tried to do for this function is first create a function which takes text, turns it into a string and puts it in a list in reverse order. Then I created another function which would simply print this list as a string. I tried to see what was wrong and I just can't figure it out; I keep getting the error "Traceback (most recent call last):
File "python", line 10, in
File "python", line 8, in reverse
File "python", line 5, in turn_to_list
TypeError: cannot concatenate 'str' and 'int' objects"
The error seems to be as a result of the text not being properly being into a string but I tried to convert a into the argument "a" into a string in the turn_to_list function so I can't see what I'm doing wrong.
def turn_to_list(a): b =  str(a) for i in range(0, len(a) + 1): b.append(a[len((a + 1) - i)]) def reverse(text): print "".join(turn_to_list(text))