There are some things wrong when i try to delete an element of a list by using function Nothing
.
Here is a simple example:
{a = Range[10], a[[1]], a[[1]] = Nothing, a}(*{{1,2,3,4,5,6,7,8,9,10},1,{2,3,4,5,6,7,8,9,10}}*)
It works,but when i try it again.
{a[[1]], a[[1]] = Nothing, a}(*{2,{2,3,4,5,6,7,8,9,10}}*)
It doesn't work.Finally i found that the first element of a could be deleted if i evaluate the code a[[2]]=Nothing
,Any answer will be most appreciated
Nothing
rather thanSequence
, the two are very similar, and the mechanism that is what puzzles the OP, is exactly the same. In this sense, this is still a duplicate, thus voting to close (apparently, I even mentionedNothing
in my answer there). $\endgroup$Nothing
will never omit this $\endgroup$