Sort[list] sorts the elements of list into canonical order.

As an example for sorting expressions: Sort[{y, x^2, x + y, y^3}] gives {x^2, y, y^3, x + y}

Could anybody please explain what is the canonical order for any expressions that applied in Sort?

  • $\begingroup$ I have marked this as a duplicate because I think in essence it is the same as one I asked myself. If you disagree please let me know. Unfortunately there doesn't appear to be an official answer. $\endgroup$
    – Mr.Wizard
    Mar 2, 2020 at 10:05


Browse other questions tagged or ask your own question.