Solution to Caesar cipher in Python