You are viewing a single comment's thread. Return to all comments →
def caesarCipher2(s, k): k = k % 26 for i in s: if 97 <= ord(i) <= 122: res.append(chr(ind if (ind:=ord(i) + k) <= 122 else ind - 26)) elif 65 <= ord(i) <= 90: res.append(chr(ind if (ind := ord(i) + k) <= 90 else ind - 26)) else: res.append(i)
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 →