Bill Jefferson <shagge...@yahoo.com> added the comment: Mark and Eric...... Wonderful! I got it now. I used x.sort(reverse=True) and x.sort(reverse=False) and it works just fine. Thanks for your help. Bill......
Regards from: William Jefferson Photography 514 Daniels St., #211 Raleigh, NC 27605 Cell Phone: (919) 931-6681 EMail: shagge...@yahoo.com Brides & Weddings: http://www.WilliamJeffersonPhotography.com Special Events: http://www.DancingLight.org ________________________________ From: Mark Dickinson <rep...@bugs.python.org> To: shagge...@yahoo.com Sent: Wednesday, April 11, 2012 8:28 AM Subject: [issue14542] reverse() doesn't reverse sort correctly Mark Dickinson <dicki...@gmail.com> added the comment: Bill, list.reverse doesn't do any *sorting* at all; it merely *reverses* the list contents. [2, 4, 3, 1] If you want to do a reverse sort, you can either first sort normally and then reverse the result, or (easier) use the 'reverse' keyword argument to the list.sort method, as follows: [4, 3, 2, 1] I suspect Eric meant to write "does not reverse sort" instead of "does not reverse". ---------- nosy: +mark.dickinson _______________________________________ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue14542> _______________________________________ ---------- _______________________________________ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue14542> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com