You are viewing a single comment's thread. Return to all comments →
Sure:
#!/bin/python3 import sys from math import ceil, sqrt s = input().strip() c = ceil(sqrt(len(s))) print(' '.join(map(lambda x: s[x::c], range(c))))
Anyone see a way to turn this into a 1-liner without calculating c twice?
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 →
Sure:
Anyone see a way to turn this into a 1-liner without calculating c twice?