You are viewing a single comment's thread. Return to all 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 )
Seems like cookies are disabled on this browser, please enable them to open this website
Encryption
You are viewing a single comment's thread. Return to all 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 )