The last letter · الحرف الأخير
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.
الحرف الأخير
الكلمة هي "python". احفظ حرفها الأخير في last، دون عداد الأحرف بنفسك.
الموقع السلبي يُحسب من النهاية: word[-1] هو الحرف الأخير، وword[-2] هو الذي قبله. تعمل بغض النظر عن الطول.
word is "python". Store its last character in last, without counting the letters yourself. · الكلمة هي "python". احفظ حرفها الأخير في last، دون عداد الأحرف بنفسك.
Click Run to see the output here. · اضغط تشغيل لرؤية المخرجات هنا.