The last letter · La última letra
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.
La última letra
La palabra es "python". Almacena su carácter final en last, sin contar las letras tú mismo.
Una posición negativa se cuenta desde el final: word[-1] es el último carácter, word[-2] el anterior a este. Funciona independientemente de la longitud.
word is "python". Store its last character in last, without counting the letters yourself. · La palabra es "python". Almacena su carácter final en last, sin contar las letras tú mismo.
Click Run to see the output here. · Haz clic en Ejecutar para ver la salida aquí.