List slicing


#1



why this code does not results the right answer? (Oops, try again. Your message doesn't look quite right; instead of "I am the secret message", it should be "I am the secret message!")
why it excludes "!"?

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


#2

if you do this, "!" won't stock in message , then your code print I am the secret message ( miss ! )


#3

Yes. Can you clarify why it won't stock in message?


#4

because in list slicing (example string ), str[start:end:stride] end is exclusive
you can comeback to List Slicing Syntax :
https://www.codecademy.com/en/courses/python-beginner-en-KAgt5/2/1


#7