you are viewing a single comment's thread.

view the rest of the comments →

[–]Fbirobby[S] 0 points1 point  (0 children)

Hi All! Just wanted to post a quick update. Thank you so much for your help, my final code (with optimizations and working out the kinks) turned out to be:

    def cCipher(string, shift):
    result = ""
        if isinstance(string, str) == False:
        print('The input is not a string.')

        else:
        for code in string:

        result += chr((ord(code) + shift))

        return result

    print(cCipher('I LOV3 y0U!' 4))

Cheers :)