Skip to content

The last letter · ⁨最后一个字母⁩

English

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.

中文

最后一个字母

word 是 "python"。把它的最后一个字符存进 last,不要自己数字母。

负数位置是从末尾开始数的:word[-1] 是最后一个字符,word[-2] 是倒数第二个。不管字符串多长都适用。

Log in or create account · ⁨登录或创建账户⁩

IGCSE, A-Level · ⁨IGCSE、A-Level⁩ & AP · ⁨与 AP⁩