Skip to content

Instantly share code, notes, and snippets.

@maxcountryman
Created January 18, 2011 20:36
Show Gist options
  • Save maxcountryman/785091 to your computer and use it in GitHub Desktop.
Save maxcountryman/785091 to your computer and use it in GitHub Desktop.
Another simple Caesar cipher
# foo = shift('string',3)
# shift(foo, -3)
shift = lambda s,i=3 : ''.join(map(lambda c : chr(c + i), map(ord, s)))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment