You can do that with a simple list comprehension:
L = [(('ABC', 'DEF'), 2), (('GHI', 'JKL'), 4)]
new_list = [e[0] + (e[1],) for e in L]
Demo:
>>> print new_list
[('ABC', 'DEF', 2), ('GHI', 'JKL', 4)]
Note: e[0]
is a tuple and e[1]
is an integer. The part (e[1],)
will create a tuple with one element.