You are viewing a single comment's thread. Return to all comments →
python3
def caesarCipher(s, k): def rotate(c): if re.match(r"[a-zA-Z]", c): order = ord(c) + k%26 if c.islower(): if order > 122: order = 96+order%122 else: if order > 90: order = 64+order%90 return chr(order) return c return "".join(map(rotate, s))
Seems like cookies are disabled on this browser, please enable them to open this website
Caesar Cipher
You are viewing a single comment's thread. Return to all comments →
python3