Other articles


  1. Rotate arbitrary

    Another way to rotate by arbitrary values.

    You can in python 2.x - just str.encode(“rot13”) - but for other rotations you could use the following (for ascii):

    from string import ascii_uppercase as uc, ascii_lowercase as lc, maketrans
    
    
    def rot_func(text, encode=True, rotate=13):
        letters = uc + lc
        rot = "".join ...
    read more

    There are comments.

Page 1 / 1

blogroll

social