I want to create the following list:
{{10,10,a,b},{20,20,a,b},{30,30,a,b},{40,40,a,b}}
I used Riffle and Table to produce the following:
Riffle[
Table[{10 j, 10 j}, {j, 1, 4}], {{a, b}}]
(* {{10, 10}, {a, b}, {20, 20}, {a, b}, {30, 30}, {a, b}, {40, 40}} *)
(Note that I am missing a {a,b} for the {40,40} term, so if any one has a better idea, I would take it.)
Partition then gives
Partition[
{{10, 10}, {a, b}, {20, 20}, {a, b}, {30, 30}, {a, b}, {40,
40}}, 2]
(* {{{10, 10}, {a, b}}, {{20, 20}, {a, b}}, {{30, 30}, {a, b}}} *)
I tried to Flatten it, but Flatten works too strongly, just deletes the inner braces, even when using its second argument.
What operation should be made to change it to
{{10,10,a,b},{20,20,a,b},{30,30,a,b},{40,40,a,b}}
?