In the Reverse Exercise, ran my code and got
Does your reverse function take exactly one argument (a string)? Your code threw a "'builtin_function_or_method' object has no attribute 'getitem'" error.
I believe it reads: a function reverse, is defined by:
an empty list, into which we append letters starting from the letter in the place of the length of the letter-1 (because the index starts at 0), and we go down by 1 step, and stop at 0.
then I returned the the items of the list reversed_word, joined by nothing, as indicated by an empty string.
I can't tell where I have gone wrong!
I do have some trouble with the indentation of return on exercises. If someone could explain to me why sometimes return goes an indent further, inside the for loop block, that would also be soooo appreciated!!
Thank you so much!
def reverse(text): reversed_word=  for i in range[len(text)-1,-1,-1]: reversed_word.append(text[i]) return ''.join(reversed_word)