Great! Next up: list slicing.

str = "ABCDEFGHIJ" start, end, stride = 1, 6, 2 str[start:end:stride]

You can think of a Python string as a list of characters.



The string in the editor is garbled in two ways:

  1. Our message is backwards.
  2. The letter we want is every other letter.

Use list slicing to extract the message and save it to a variable called message.

Take this course for free

Mini Info Outline Icon
By signing up for Codecademy, you agree to Codecademy's Terms of Service & Privacy Policy.

Or sign up using:

Already have an account?