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 & AP