The last letter · Chữ cái cuối cùng
The last letter
word is "python". Store its last character in last, without counting the letters yourself.
A negative position counts from the end: word[-1] is the last character, word[-2] the one before it. It works whatever the length.
Ký tự cuối cùng
word là "python". Lưu ký tự cuối cùng của nó vào last, mà không cần tự đếm các chữ cái.
Một vị trí âm tính từ cuối: word[-1] là ký tự cuối cùng, word[-2] là ký tự trước nó. Nó hoạt động bất kể độ dài nào.
word is "python". Store its last character in last, without counting the letters yourself. · word là "python". Lưu ký tự cuối cùng của nó vào last, mà không cần tự đếm các chữ cái.
Click Run to see the output here. · Nhấn Chạy để xem kết quả ở đây.