The last letter · Huruf terakhir
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.
Huruf terakhir
word is "python". Simpan karakter terakhir-nya dalam last, tanpa menghitung huruf-hurufnya sendiri.
Posisi negatif dihitung dari akhir: word[-1] adalah karakter terakhir, word[-2] adalah sebelumnya. Ini bekerja berapapun panjangnya.
word is "python". Store its last character in last, without counting the letters yourself. · word is "python". Simpan karakter terakhir-nya dalam last, tanpa menghitung huruf-hurufnya sendiri.
Click Run to see the output here. · Klik Jalankan untuk melihat output di sini.