Duplicates in lists
aahz at netcom.com
Thu Mar 9 16:28:34 CET 2000
In article <38C748C7.35162A7B at teleatlas.com>,
Michael Husmann <michael.husmann at teleatlas.com> wrote:
>is there someone who has an efficient function that finds all
>duplicates in a list? I used a hash which works quite reasonable but
>maybe there is a better way.
If you're already using a dictionary, you'll only be able to do
micro-optimizations; your basic algorithm is the best available in
Python. If you want us to show you how to optimize Python code, post
what you've got here.
--- Aahz (Copyright 2000 by aahz at netcom.com)
Androgynous poly kinky vanilla queer het <*> http://www.rahul.net/aahz/
Hugs and backrubs -- I break Rule 6
"Along the lines of getting a massage, taking a hot bubble bath, and
swimming in a pool of warm, melted chocolate, can you give me some
innovative ways that you pamper yourself?"
"Spend three hours flaming stupid people on the Net." --Aahz
More information about the Python-list