spam -1 dog print spam

1
2
spam[-1] = 'dog'
print(spam)