I want to extend a list in lists by the value of another list:
list1 = [['a', 'a'], ['b','b'], ['c','c']]
list2 = [1,2,3]
I would like this:
list3 = [['a','a',1], ['b','b',2], ['c','c',3]]
Thank you for your help.
>>> [x + [y] for x, y in zip(list1, list2)]
[['a', 'a', 1], ['b', 'b', 2], ['c', 'c', 3]]