# Every character in a string has a position — called an index
# Indexes start at 0, not 1

name = "Bull"
#       B u l l
#       0 1 2 3

# Access a character by its index
print(name[0])  # B
print(name[1])  # u
print(name[2])  # l
print(name[3])  # l

# Negative indexes count from the end
print(name[-1])  # l — last character
print(name[-2])  # l — second to last
print(name[-4])  # B — first character

# Spaces are characters too — they have an index
phrase = "Red Horn"
#         R e d   H o r n
#         0 1 2 3 4 5 6 7

print(phrase[3])   # (space)
print(phrase[4])   # H

# Check the length of a string
print(len(name))    # 4
print(len(phrase))  # 8
