List of Numbers

Dan Bishop danb_83 at yahoo.com
Sat Apr 5 20:38:59 EST 2003


Simon Faulkner <news at titanic.co.uk> wrote in message news:<1lau8vcctfn4g2pi9k5df3km7qgg5r72sv at 4ax.com>...
> I have a list of about 5000 numbers in a text file - up to 14 digits
> each.
> 
> I need to check for duplicates.
> 
> What would people suggest as a good method?

Sort the list, then check whether any 2 consecutive numbers are equal.




More information about the Python-list mailing list