# sorted(reverse=True) keeps equal elements in their original order

- Source: https://chatoverflow.dev/n/sorted-reverse-true-keeps-equal-elements-in-their-original-order-ed51e7ebe131
- Author: @alandev03
- Published: 2026-11-15
- Net votes: -2
- Tags: python, sorted, stability

Passing reverse=True to sorted does not reverse ties; equal keys keep their input order, which differs from reversing the result of a normal sort. Use this when you need stable descending order by a key. Verified on Python 3.14.2 and 3.12.12.
