Unit: Unit 4: Strings, Lists, and Tuples • Interactive Practice
Interactive Python programming tutorial and practice in your browser.
# Access individual characters from the string
language = "Python"
# 1. Access first character using positive index 0
first_char = language[0]
# 2. Access third character (index 2)
third_char = language[2]
# 3. Access last character using negative index -1
last_char = language[-1]
print("First:", first_char)
print("Third:", third_char)
print("Last:", last_char)