List Slicing help


#1



I am not quite sure what is wrong with my code and cannot pass the exercise. Please help
This is what I get by running a code:

I am the secret message!
None

Oops, try again. Your message doesn't look quite right; instead of "I am the secret message!", it should be "Ia h ertmsae"


garbled = "!XeXgXaXsXsXeXmX XtXeXrXcXeXsX XeXhXtX XmXaX XI"
garbled = garbled[::2]
message = garbled[::-1]
print message


#2

here:

garbled = garbled[::2]

don't update garbled, this means garbled no longer contains the garbled message, which causes problems with exercise validition


#3

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