[BangPypers] need help w.r.t itertools

Saager Mhatre saager.mhatre at gmail.com
Fri Sep 13 14:39:49 CEST 2013


On Fri, Sep 13, 2013 at 5:01 PM, Dhruv Baldawa <dhruvbaldawa at gmail.com>wrote:

> d = [''.join(x) for x in itertools.product(a, b, c)]
>

Actually, using itertools.imap would ensure that the elements aren't
computed till necessary. So...

d = itertools.imap(''.join, itertools.product(a, b, c))

- d


More information about the BangPypers mailing list