Having 2 lists, can be different or same lengths.
a = [('1','1','2'), ('2','2','2','2'), ('3','3')]
b = [('7','8','8','9'), ('0','0','4','5')]
How can I add / concat the lists such that I'll get the following output.
Also, not sure if I'm using the right terminology here. Appreciate any corrections.
c = [
('1','1','2','7','8','8','9'),('1','1','2','0','0','4','5'),
('2','2','2','2','7','8','8','9'),('2','2','2','2','0','0','4','5'),
('3','3','7','8','8','9'),('3','3','0','0','4','5')
]
Essentially, c = [ (a[0] + b[0]), (a[0] + b[1]), (a[1] + b[0]), (a[1] + b[1]).....
Thus far, I've just been using for loops. I've looked at itertools.product, but the output isn't right. Additionally, if I increase it to 3 lists, then the combination becomes larger.