I\'m trying to make a \"Caesar\'s Cipher\" while using python..this is what I have so far. Could anyone tell me how this is looking? Am I going in the right direction? What
I very simple, 3-shift solution without Umlauts and alike would be:
def caesar(inputstring):
shifted=string.lowercase[3:]+string.lowercase[:3]
return "".join(shifted[string.lowercase.index(letter)] for letter in inputstring)
and reverse:
def brutus(inputstring):
shifted=string.lowercase[-3:]+string.lowercase[:-3]
return "".join(shifted[string.lowercase.index(letter)] for letter in inputstring)
using it:
caesar("xerxes")