word = "Hello world"print word[-1] # The last characterprint word[-2] # The last-but-one characterprint word[-2:] # The last two charactersprint word[:-2] # Everything except the last two characters