[BangPypers] need help w.r.t itertools

Suyash Bhatt bhatt.suyash at gmail.com
Fri Sep 13 13:23:19 CEST 2013


Hi all,

i need help in finding the most optimized way of making a list using
itertools.

Suppose I have 3 lists:

*a=[‘my1’,’my2’]
*

**

*b=[‘name1’,’name2’]*

*c=[‘is1’]*

 I want to iter through all and form another list with the following
appended strings:

*d=['my1name1is1','my1name2is1','my2name1is1','my2name2is1']*

Can this be done in a single line using the itertools module??


Regards,

Suyash


More information about the BangPypers mailing list