Reverse


#1


https://www.codecademy.com/courses/python-intermediate-en-rCQKw/1/1?curriculum_id=4f89dab3d788890003000096#

returns None


I dont know what Im doing wrong, I tried different ways of converting my list into a string and failed every time, the programme sais for "Python!" it returns "" instead of "!nohtyP"


def reverse(text):
    list1 = []
    for letter in text:
        list1.insert(0,letter)
    ans = ""
    for i in list1:
        ans.join(i)
    return ans


#2

if i where you, i would check on some documentation how to use .join(), you use it incorrectly

you can also join strings together with +, maybe you find this easier


#4

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.