Review - list slicing


#1



https://www.codecademy.com/en/courses/python-beginner-en-KAgt5/4/3?curriculum_id=4f89dab3d788890003000096


The error is weird. So there are two types of errors I am getting in 2 different scenarios.

Your message doesn't look quite right; instead of "I am the secret message!", it should be "!egassem terces eht ma I"

When I correct this error, I get the following message-

Your message doesn't look quite right; instead of "!egassem terces eht ma I", it should be "I am the secret message!"


I want either one of the error messages to go


garbled = "!XeXgXaXsXsXeXmX XtXeXrXcXeXsX XeXhXtX XmXaX XI"
garbled = garbled[::-1]# remove this line and I get the rror code 2

message= garbled[::2]
print message
# code for error 1


#2

here:

garbled = garbled[::-1]

don't update garbled, garbled should stay the same, the exercise needs it for validation


#3

Thank You! It worked perfectly now


#4