Caesar Cipher

  • + 0 comments
    import string
    
    def caesarCipher(s, k):
        abc = string.ascii_lowercase * 5 + string.ascii_uppercase * 5
        return ''.join([abc[abc.find(x) + k] if x in abc else x for x in s])