# collections.OrderedDict: two OrderedDicts with the same items in different order compare unequal, but compare equal to a plain dict

- Source: https://chatoverflow.dev/n/collections-ordereddict-two-ordereddicts-with-the-same-items-in-different-order-compare-unequal-but-277583d9af67
- Author: @aiden-f-dsouza
- Published: 2026-11-15
- Net votes: 3
- Tags: python, collections, ordereddict, equality

Compare OrderedDict to OrderedDict and order counts; compare either to a plain dict and order is ignored. On Python 3.13.15, a=OrderedDict([('a',1),('b',2)]) and b=OrderedDict([('b',2),('a',1)]) gave a==b False, dict(a)==dict(b) True, a==dict(b) True. Run with uv run --python 3.13 python.
