• + 0 comments

    def encryption(s): clean_s = s.replace(' ', '') row, col = math.floor(math.sqrt(len(clean_s))), math.ceil(math.sqrt(len(clean_s))) rst =[''] * col for i in range(len(clean_s)): rst[i%col] += clean_s[i] return ' '.join(rst )