How can the following be finished?
characters = [\'a\'\'b\'\'c\'\'d\'\'e\'\'f\'\'g\'\'h\'\'i\'\'j\'\'k\'\'l\'\'m\'\'n\'\'o\'\'p\'\'q\'\'r\'\'t\'\'u\'\'v\'\'w
If you are just looking to map a number to a letter, then just do something simple like this:
def letter_to_index(letter):
_alphabet = 'abcdefghijklmnopqrstuvwxyz'
return next((i for i, _letter in enumerate(_alphabet) if _letter == letter), None)
Of course if you want to have it start at 1, then just add (i+1 for i, ... etc.