New submission from Tamirys Pino <taamyp...@gmail.com>:
>>> data=[2, 3, 2, 4, 5, 12, 2, 3, 3, 3, 12, 5] >>> data [2, 3, 2, 4, 5, 12, 2, 3, 3, 3, 12, 5] >>> sorted(data) [2, 2, 2, 3, 3, 3, 3, 4, 5, 5, 12, 12] >>> sorted(data, key=data.count) [4, 5, 12, 12, 5, 2, 2, 2, 3, 3, 3, 3] [4, 5, 12, 12, 5, 2, 2, 2, 3, 3, 3, 3] should be [4, 5, 5, 12, 12, 2, 2, 2, 3, 3, 3, 3] ---------- messages: 354063 nosy: Tamirys Pino priority: normal severity: normal status: open title: Bug on sorted with count key type: behavior versions: Python 3.6 _______________________________________ Python tracker <rep...@bugs.python.org> <https://bugs.python.org/issue38389> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com