Re: Mutiple delete in lists
- To: mathgroup at christensen.cybernetics.net
- Subject: [mg373] Re: [mg360] Mutiple delete in lists
- From: Xah Y Lee <xyl10060 at fhda.edu>
- Date: Tue, 27 Dec 1994 23:58:52 -0800 (PST)
On Mon, 26 Dec 1994, Gottfried Mayer-Kress wrote: > According to the Mathematica book 1.8.6 the command: > Delete[{1,2,3,4,5},2] > will produce > {1,3,4,5} > and: > Delete[{1,2,3,4,5},{2,3}]] > should produce > {1,4,5} > but I get the error message: > Delete::part: Part {2, 3} of {1, 2, 3, 4, 5} does not exist. Mma book did not give an example of Delete[{1,2,3,4,5},{2,3}] To delete the 2nd and 3rd part, you need to put braces around 2 and 3. See mma book chapter 1.8.6, page 129, look at the example In[7] on ReplacePart. Why you need the braces is explained there. Xah Lee xyl10060 at tiptoe.fhda.edu Scholar of Romance (currently searching for a romantic peer) Mountain View, CA