Obtenga el extremo de la cadena Python

a = "abcde"
lastChar = a[-1]
print(f'Using index, lastChar is {lastChar} , using slice last char = { a[len(a)-1::] } = { a[len(a)-1] } = { a[:-2:-1] }') 
'''
output
Using index, lastChar is e , using slice last char = e 
'''
ruperto2770