# How do I use drop to drop the second element from all these sublists? [duplicate]

{{1, 2}, {2, 3}, {5, 4}}

I tried to do this:

Drop[#, {2}] & @@ {{1, 2}, {2, 3}, {5, 4}}


but it gave

{1}

but what I want is

{{1},{2},{5}}

• Use Map(/@) instead of Apply (@@). Drop[#, {2}] & @@ {{1, 2}, {2, 3}, {5, 4}} is essentially equivalent to Drop[{1, 2}, {2, 3}, {5, 4}, {2}], which is clearly not what you want – Lukas Lang Jan 8 '19 at 12:19
• I'd like to add to the answers here that the correct function for dropping a single element is Delete, not Drop. Drop is the opposite of Take. – Sjoerd Smit Jan 8 '19 at 14:06
• Welcome to Mathematica.SE user62264! I suggest the following: 1) As you receive help, try to give it too, by answering questions in your area of expertise. 2) Take the tour and check the faqs! 3) When you see good questions and answers, vote them up by clicking the gray triangles, because the credibility of the system is based on the reputation gained by users sharing their knowledge. Also, please remember to accept the answer, if any, that solves your problem, by clicking the checkmark sign! – Chris K Jan 8 '19 at 14:40

lst = {{1, 2}, {2, 3}, {5, 4}};

Drop[lst, None, {2}]


{{1}, {2}, {5}}

Your result is the first column of a matrix. If list={{1, 2}, {2, 3}, {5, 4}} ,

res=list[[All, 1]]


If you need the brackets around each element, Partition[res, 1]

If your lists are of unequal length, the solution from Lukas Lang is fine. I include for completeness.

Drop[#, {2}] & /@ {{1, 2}, {2, 3}, {5, 4}}