Get character position in alphabet
You can use ord() to get a character's ASCII position, and chr() to convert a ASCII position into a character.
EDIT: Updated to wrap alphabet so a-1 maps to z and z+1 maps to a
For example:
my_string = "zebra"difference = -1new_string = ''.join((chr(97+(ord(letter)-97+difference) % 26) for letter in my_string))
This will create a string with all the characters moved one space backwards in the alphabet ('ydaqz'). It will only work for lowercase words.