Last to extract the last element of an expression. Let
Last@poly, I expect the output is
z. However, the command gave me
FullForm@poly, I found the output is
Log[a] should be the correct answer of the command, but not my expected answer.
The strange behavior confuse me.
- I wonder whether elements of an
expressionin mathematica have definite order.
- If the answer is "no", is there any alternative other than
Lastto avoid the undetermined behavior, so that I can extract particular element ?