merge list of tuples with list
James Mills
prologic at shortcircuit.net.au
Wed Oct 20 00:10:58 EDT 2010
On Wed, Oct 20, 2010 at 1:33 PM, Daniel Wagner
<brocki2301 at googlemail.com> wrote:
> Any more efficient ways or suggestions are still welcome!
Did you not see Paul Rubin's solution:
>>> [x+(y,) for x,y in zip(a,b)]
[(1, 2, 3, 7), (4, 5, 6, 8)]
I think this is much nicer and probably more efficient.
cheers
James
--
-- James Mills
--
-- "Problems are solved by method"
More information about the Python-list
mailing list