Caesar cipher in Python
Python strings have a translate method that applies a substitution cipher. There is also a function str.maketrans (string.maketrans in Python 2) that helps with building the translation table:

&gt;&gt;&gt; from string import ascii_lowercase as alphabet
&gt;&gt;&gt; shift = 13
&gt;&gt;&gt; cipher = str.maketrans(alphabet, alphabet[shift:] + alphabet[:shift])
&gt;&gt;&gt; print("caeser salad is tasty".translate(cipher))
pnrfre fnynq vf gnfgl


of coarse in python2(with a shift of 13) one can simply do "My Message".encode("rot13")