txt = "Hello World!"
try:
txt[0] = "J"
print("We can change strings!")
except TypeError:
print("If we try to change a string, we get a TypeError because strings do not support item assignment.")
try:
lst = ([])
lst.append(32)
print("We can change lists! The list now contains one element: {}".format(lst))
except TypeError:
print("We encountered an error!")
I hope this helps! If you have any other questions, I'll do my best to answer them.