Skip to content

Instantly share code, notes, and snippets.

@techieji
Last active March 10, 2022 21:14
Show Gist options
  • Save techieji/16bf4492f04f0f575ba1d39a81dbfacc to your computer and use it in GitHub Desktop.
Save techieji/16bf4492f04f0f575ba1d39a81dbfacc to your computer and use it in GitHub Desktop.
# Simple ceasar cipher (1 line of logic)
from string import ascii_uppercase as au
s=int(input("Shift: "))
print(''.join(map(dict(zip(au+' ',au[-s:]+au[:-s]+' ')).get,input("Text: ").upper())))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment