4.6 Strings and slicing
The slicing rules we saw for lists in section 3.2.6 also work for strings, except that you cannot put a string slice on the left-hand side of an assignment.
word = "sesquipedalianism"
len(word)
17
print(word[3:9])
print(word[:7])
print(word[7:])
quiped
sesquip
edalianism
print(word[::3])
print(word[::-1])
sqpaas
msinailadepiuqses
word[0] = 'S'
TypeError: 'str' object does not support item assignment
Exercise 4.2
Look up the English definition of “sesquipedalianism.”