1
$\begingroup$

I have a $\psi$:

{a,b,c,d,e,...}

for example for 10 letters. How can I change it in the format:

 {{a},{b},{c},{d},{e},...}

I cannot understand why Transpose doesn't work for this aim!?

$\endgroup$
8
  • 3
    $\begingroup$ I would just use Map? Map[List, L] where L is your original list. screen shot !Mathematica graphics Transpose works on matrix (list of lists) not one a flat list like you have. $\endgroup$
    – Nasser
    Jun 4 at 14:34
  • 3
    $\begingroup$ If you must use Transpose you can do Transpose[{L}] screen shot !Mathematica graphics $\endgroup$
    – Nasser
    Jun 4 at 14:40
  • 4
    $\begingroup$ "The Wolfram Language makes no distinction between "row" and "column" vectors." ref What are you trying to accomplish that requires the additional list brackets? $\endgroup$
    – Bob Hanlon
    Jun 4 at 14:41
  • 2
    $\begingroup$ Also: Partition[{a, b, c, d, e}, {1}] or Outer[List, {a, b, c, d, e}] $\endgroup$ Jun 4 at 16:41
  • 4
    $\begingroup$ Yes, there are at least 10 different ways to do the same thing in Mathematica :) $\endgroup$
    – Nasser
    Jun 4 at 17:36

0

Browse other questions tagged or ask your own question.