New submission from wyz23x2 <wyz2...@163.com>:
Starting from Python 2.3, the handy enumerate() was introduced. However, I suggest to add a "reverse" parameter: >>> lis = ['a', 'b', 'c', 'd'] >>> list(enumerate(lis)) [(0,'a'),(1,'b'),(2,'c'),(3,'d')] >>> list(enumerate(lis,reverse=True) [('a',0),('b',1),('c',2),('d',3)] >>> ---------- components: Build messages: 361670 nosy: wyz23x2 priority: normal severity: normal status: open title: reverse parameter for enumerate() type: enhancement versions: Python 3.9 _______________________________________ Python tracker <rep...@bugs.python.org> <https://bugs.python.org/issue39596> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com