Created
December 17, 2017 18:57
-
-
Save zettca/65094fe7dcfb323c074562a37a24b1f2 to your computer and use it in GitHub Desktop.
Python3 ROT n encode
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
chrs = "ABCDEFGHIJKLMNOPQRSTUVWXYZ" | |
def rot_encode(string, i): | |
return "".join([chrs[chrs.index(c) + i % len(chrs)] for c in string]) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment