Skip to content

Instantly share code, notes, and snippets.

@firaja
Created July 17, 2019 14:55
Show Gist options
  • Save firaja/539b03d792f3f0ec000bf663a8c2ea35 to your computer and use it in GitHub Desktop.
Save firaja/539b03d792f3f0ec000bf663a8c2ea35 to your computer and use it in GitHub Desktop.
def caesar_cipher(message, key):
result = ""
for m in message:
result += chr((ord(m) + key - 97) % 26 + 97)
return result
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment