Consider a big list where all the inner lists' lengths are the same
list = {{x1, y1, z1, t1}, {x2, y2, z2, t2}, {x3, y3, z3, t3}, ...};
elementNo = {4, 3, 2};
I want output like this,
{{x1}, {x2}, {x3}, ...}
That is, when I specify elementNo
as {4, 3, 2}
, I mean the elements at positions 2, 3 and 4 in the sub-lists should be removed -- I want the elements at position 1 only. When I specify elementNo
as {2, 3}
, I want
{{x1, t1}, {x2, t2}, {x3, t3}, ...}
How can I do this?
elementNO
. $\endgroup$