1
$\begingroup$

I have for example set of points

p={1/5,1/2}

and I would like to add brackets to the list, so I would like to get a set of points

p2={{1/5},{1/2}}

I know how to remove brackets, but I cant find if is possible also to add brackets. Thank you for any suggestions.

$\endgroup$
  • 5
    $\begingroup$ Try p2=Transpose[{p}] $\endgroup$ – yarchik Dec 30 '18 at 14:28
  • 7
    $\begingroup$ List/@p (or Map[List,p]) also works $\endgroup$ – Lukas Lang Dec 30 '18 at 14:29
  • 7
    $\begingroup$ The fastest method should be Partition[p,1]. $\endgroup$ – Henrik Schumacher Dec 30 '18 at 14:31
  • $\begingroup$ Brackets {} stand for List, I suggest to go through some sort of introduction tutorial. It will make you life easier. $\endgroup$ – Kuba Jan 2 '19 at 21:57