Log in from a computer to take this course

You'll need to log in from a computer to start Learn Python 2. But you can practice or keep up your coding streak with the Codecademy Go app. Download the app to get started.

apple storegoogle store
Learn

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.

Instructions

1.

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?