Services & Resources / Wolfram Forums
MathGroup Archive
*Archive Index
*Ask about this page
*Print this page
*Give us feedback
*Sign up for the Wolfram Insider

MathGroup Archive 1997

[Date Index] [Thread Index] [Author Index]

Search the Archive

Re: list manipulation problem

  • To: mathgroup at
  • Subject: [mg9083] Re: [mg9062] list manipulation problem
  • From: Allan Hayes <hay at>
  • Date: Mon, 13 Oct 1997 23:33:01 -0400
  • Sender: owner-wri-mathgroup at

Teemu Vesanen <Teemu.Vesanen at>
[mg9062] list manipulation problem

> I have a list like
> {{a, b, c}, {d, e, f}, {g, h, i}}
> I need to delete the third term of each sublist.
> In other words how do I make the list look like
> {{a, b}, {d, e}, {g, h}}


lst = {{a, b, c}, {d, e, f}, {g, h, i}};

	{{a, b}, {d, e}, {g, h}}
	{{a, b}, {d, e}, {g, h}}
(using Thread instead of Transpose is often quicker)

Of course the techniques can be used more generally

	{{a, c}, {d, f}, {g, i}}
Allan Hayes
hay at
voice:+44 (0)116 2714198
fax: +44 (0)116 2718642
Leicester,  UK

  • Prev by Date: Re: list manipulation problem
  • Next by Date: Re: wierd Log[0] *0 result
  • Previous by thread: Re: list manipulation problem
  • Next by thread: anti-aliasing MMA graphics