Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.python > #7018 > unrolled thread
| Started by | Vito 'ZeD' De Tullio <zak.mc.kraken@libero.it> |
|---|---|
| First post | 2011-06-04 21:34 +0200 |
| Last post | 2011-06-04 21:34 +0200 |
| Articles | 1 — 1 participant |
Back to article view | Back to comp.lang.python
This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by
below is the oldest one visible, not the original post.
Re: Lambda question Vito 'ZeD' De Tullio <zak.mc.kraken@libero.it> - 2011-06-04 21:34 +0200
| From | Vito 'ZeD' De Tullio <zak.mc.kraken@libero.it> |
|---|---|
| Date | 2011-06-04 21:34 +0200 |
| Subject | Re: Lambda question |
| Message-ID | <mailman.2457.1307216114.9059.python-list@python.org> |
jyoung79@kc.rr.com wrote:
> I was surfing around looking for a way to split a list into equal
> sections.
non-recursive, same-unreadeable (worse?) one liner alternative:
def chunks(s, j):
return [''.join(filter(None,c))for c in map(None,*(s[i::j]for i in
range(j)))]
--
By ZeD
Back to top | Article view | comp.lang.python
csiph-web