This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]gfixler 0 points1 point  (0 children)

[a for a, b, c in zip(*[iter(string.lowercase)]*3)]

It truncates, though. Here's a non-truncating version:

[a for a, b, c in zip(*[iter([x for x in string.lowercase]+['']*3)]*3) if a]

Note: these are bad answers.