So wählen Sie die letzten 2 Elemente in einer String -Python aus

>>>mystr = "abcdefghijkl"
>>>mystr[-4:]
'ijkl'

>>>mystr[:-4] #to select all but last 4 characters
'abcdefgh'
Innocent Impala