[Zope] stripping values from string
Tom Emerson
tree@basistech.com
Wed, 8 Jan 2003 11:59:51 -0500
Mike Doanh Tran writes:
> I have two list from my input form:
>
> ListA: [a,b,c,d]
> ListB: [1,2,3,4]
>
> How can i strip ListA and ListB so that the
> first value of ListA will correspond to the first value of ListB
> and the second of A to sencond of B and so on:
>
> Example: (a,1), (b,2),(c,3),(d,4)
This is done trivially in Python using map:
>>> map(None, ['a','b','c','d'], [1,2,3,4])
[('a', 1), ('b', 2), ('c', 3), ('d', 4)]
HTH(tm),
-tree
--
Tom Emerson Basis Technology Corp.
Software Architect http://www.basistech.com
"Beware the lollipop of mediocrity: lick it once and you suck forever"