python print last 3

message = iloveyouchina
#get last x words
#for example x = 3
print(message[-3:]

Here is what the above code is Doing:
1. We’re taking the string message and slicing it from the end.
2. We’re slicing it from the end by 3 characters.
3. We’re printing the result.