I know this is probably a very silly question but I am trying to get {x,y,z,p} to be x,y,z,p.
For this I am using Flatten
in this way:
Flatten[{x, y,z,p}]
Flatten @@@ {x, y,z,p}
but it does not work. How can I do this?
NOTE: What I want to do is the following:
Give a list such as:
list={36.3019, 36.9458, 37.983, 38.9583, 39.2301, 40.0107};
I want to add four numbers (30.40.50,60) into the 4 position such:
Insert[List, Flatten[{30, 40, 50, 60}], 4]
The problem I am having is that these numbers are not flatten and I get: {36.3019, 36.9458, 37.983, {30, 40, 50, 60}, 38.9583, 39.2301, 40.0107}
Sequence
. $\endgroup$Sequence [x,y,z,p]
but this does not work either $\endgroup$FullForm
of the thing you want to convertList[x,y,z,p]
into? @b.gates.you.know.what has already suggested usingSequence
which is very useful when you want to splice elements into aList
or an argument list without changing the structure. But everything in Mathematica is an expression, and it's not clear what kind of expression you want to convert your list into. $\endgroup$Flatten
outside theInsert
, but I expect that isn't what you want, is it? $\endgroup$