Skip to content

Instantly share code, notes, and snippets.

@arkan-leki
Last active January 20, 2018 20:41
Show Gist options
  • Save arkan-leki/e2761f42e55956827baf6679796cd41d to your computer and use it in GitHub Desktop.
Save arkan-leki/e2761f42e55956827baf6679796cd41d to your computer and use it in GitHub Desktop.
simple code of Caesar Cipher in python
arr = "abcdefghijklmnopqrstuwxyz"
key = 3
plain = "hello world 2day"
cyper = "";
for c in plain:
if c.isalpha() : cyper += arr[(arr.index(c)+3)%26]
else: cyper += c
print(cyper)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment