Psst! Check what courses we have in our offer, and get them all here to save $727. Act fast–this deal is available only 3/14–3/21.
Introduction
Quick recap
4. Accessing string characters
Indexing and slicing
Summary

Instruction

Perfect. To access a specific character in a string, use square brackets:

secret_password = 'jhk7GSH8ds'
print('Password hint: the third letter of your password is ' + secret_password[2])

To access the third character in this string, you'd use

secret_password[2] # not [3]!
This is because character indices start at 0.

Exercise

Take a look at the template code. Print the tenth character.

Stuck? Here's a hint!

The tenth character has an index of 9.