merge list of tuples with list

Daniel Wagner brocki2301 at
Wed Oct 20 02:16:58 CEST 2010

Hello Everyone,

I'm new in this group and I hope it is ok to directly ask a question.

My short question: I'm searching for a nice way to merge a list of
tuples with another tuple or list. Short example:
a = [(1,2,3), (4,5,6)]
b = (7,8)

After the merging I would like to have an output like:
a = [(1,2,3,7), (4,5,6)]

It was possible for me to create this output using a "for i in a"
technique but I think this isn't a very nice way and there should
exist a solution using the map(), zip()-functions....

I appreciate any hints how to solve this problem efficiently.

Daniel Wagner

More information about the Python-list mailing list