Text scrambler/descrambler written in Python, early python assignment