Skip to content

Instantly share code, notes, and snippets.

@zackmdavis
Created June 16, 2016 19:50
Show Gist options
  • Save zackmdavis/4c864dfc20c1e06eaa6db5b499614848 to your computer and use it in GitHub Desktop.
Save zackmdavis/4c864dfc20c1e06eaa6db5b499614848 to your computer and use it in GitHub Desktop.
# if you can easily fit it in less than one and a half tweets, I don't think it
# deserves to be called a "project"
from string import ascii_uppercase as u, ascii_lowercase as l; c = lambda m, n: ''.join((chr((ord(c)-97+n)%26+97) if c in l else chr((ord(c)-65+n)%26+65)) if c in l+u else c for c in m)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment