Suppose I have two lists as follow: I want to add each element of list x with each element of list y while keeping the structure as given in x the desired output should be like: So far I’ve done: where res produces the sums correctly but I am losing the structure, I get: Also is there a better way