17 List Slicing - Solution seem to work but it does not!


#1

Hello everyone,

I am stuff on this exercise and I saw some solutions but they do not give any other result than the one I have. Could you help me? Why is this one wrong?

Thanks,
Renaud

17 List Slicing


garbled = "!XeXgXaXsXsXeXmX XtXeXrXcXeXsX XeXhXtX XmXaX XI"

def backward(dorw):
    word = []
    for letter in dorw:
        word.append(letter)
    message = ''.join(word[::-2])
    print message
    
print backward(garbled)

and the solution I get:

I am the secret message!
None
None


#2

Nevermind - I just created a function for nothing!

THanks!


#4

This topic is solved.