I can't identify why the elements in my list will not join together
My error message: Oops, try again. Your function fails on reverse("Python!"). It returns "['!', 'n', 'o', 'h', 't', 'y', 'P']" when it should return "!nohtyP".
I expected each element in my list to be concatenated into a string.
def reverse(text): n = len(text) letters = list(text) reversed_letters =  s = '-' d = '' for i in range(n): reversed_letters += letters[n-1-i] return(reversed_letters) reversed_word = s.join(reversed_letters) #reversed_word = d.join(reversed_letters) return(reversed_word)
I noticed that after I return the reversed_letters, I get back a list of elements with single guotes around them. I am trying to understand how to properly use the
.join function. Could it be that I created a list of single quote elements when it would be double?