I have the following list :
list={a^2, b^2, a^-1, a^2+b^2, (a+b+c)^-1, (a+b-c)^-2}
Do[Print[list[[i]]//FullForm],{i,1,Length[list]}]
I want to break this list into two lists: one containing elements starting with Power
and another starting with Plus
. In this case it will be
list1 = {a^2, b^2, a^-1, (a+b+c)^-1, (a+b-c)^-2}
list2 = {a^2+b^2}
A priori the position of elements starting with Power
or Plus
is not fixed and also the elements could be complicated. Is it possible to do this?