Access individual characters using square brackets with an index:
name = "Alice"
print(name[0]) # "A" (first character)
print(name[1]) # "l" (second character)
print(name[-1]) # "e" (last character)
Indexes start at , not . The first character is at index . This is standard in most programming languages.
Negative indexes count from the end. -1 is the last character, -2 is second to last, and so on.
Going out of bounds raises an error. name[100] fails if the string isn't that long.