I have following lists -
val A = List(("A","B","C","D"),("A1","B1","C1","D1"),("A2","B2","C2","D2"))
and
val B = List(("P","Q","R","S","T"),("P1","Q1","R1","S1","T1"),("P2","Q2","R2","S2","T2"),("P3","Q3","R3","S3","T3"))
I want to merge 1st element of list A with first element of list B and so on. here list A have 3 elements and B have 4. I want to consider number of elements in list A while merging.
output as below
val combineList = List(("A","B","C","D","P","Q","R","S","T"),("A1","B1","C1","D1","P1","Q1","R1","S1","T1"),
("A2","B2","C2","D2","P2","Q2","R2","S2","T2"))