Skip to content

Instantly share code, notes, and snippets.

@JoaoFelipe
Last active May 27, 2017 19:30
Show Gist options
  • Save JoaoFelipe/45800a371861162732287fe7f0cc1ef7 to your computer and use it in GitHub Desktop.
Save JoaoFelipe/45800a371861162732287fe7f0cc1ef7 to your computer and use it in GitHub Desktop.
fo trol motzplnet hi
s="iet"cut=2lns=[]frxi ag(on)
o ,lte neueaes: lnsi%lnlns]apn(etro "
rn("ji(hi.rmieal(ie))rmietosipr i_ogs,can
drio
on
ie [ o nrnecut]fri etri nmrt()
ie[ e(ie).pedlte r")pit".oncanfo_trbelns)
from itertools import zip_longest, chain
s = "direito"
count = 2
lines = [[] for x in range(count)]
for i, letter in enumerate(s):
lines[i % len(lines)].append(letter or "")
print("".join(chain.from_iterable(lines)))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment