You are viewing a single comment's thread. Return to all comments →
Python 3:
def caesarCipher(s: str, k: int) -> str: k = k % 26 rotated = ascii_lowercase[k:] + ascii_lowercase[:k] return s.translate( str.maketrans( dict(zip(ascii_letters, f"{rotated}{rotated.upper()}", strict=True)) ) )
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 →
Python 3: