MathGroup Archive 2006

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

Search the Archive

Inserting Blank Lists

  • To: mathgroup at smc.vnet.net
  • Subject: [mg68231] Inserting Blank Lists
  • From: Bruce Colletti <vze269bv at verizon.net>
  • Date: Sun, 30 Jul 2006 04:47:54 -0400 (EDT)
  • Sender: owner-wri-mathgroup at wolfram.com

Re Mathematica 5.2.

The code below inserts a null list between L-elements:

L={{"a","b"},{"c","d"},{"e","f"}};
Most@Flatten[Map[{#,{}}&,L],1]

Out[9]=
{{a,b},{},{c,d},{},{e,f}}

What is a shorter way to do this?  Thankx.

Bruce


  • Prev by Date: {x},{y} -> {x,y} ?
  • Next by Date: Directories and Subdirectories
  • Previous by thread: Re: {x},{y} -> {x,y} ?
  • Next by thread: Re: Inserting Blank Lists