[Zope] Dupe checking a list of tuples
Fri, 19 Jul 2002 13:11:52 -0700
for x,y in mylist:
It will be in a random order aftward though. And duplicate may depend on the
definition of equality, which may not do what you expect.
> -----Original Message-----
> From: email@example.com [mailto:firstname.lastname@example.org]On Behalf Of
> Sent: Friday, July 19, 2002 12:09 PM
> To: email@example.com
> Subject: [Zope] Dupe checking a list of tuples
> Is it possible to remove duplicate records from a list of tuples?
> Here's a sample of my list. I'd like to make sure a url doesn't
> occur twice
> in the list, and delete the offending tuple if it does.
> [('http://www.news.com/frontdoor/0-1.html?tag=hd_ts', 'CNET'),
> ('http://www.news.com/shopping/0-1257.html?tag=hd_ts', 'Price
> I'm sorry if this is elementary, but I'm fairly new to Python and
> have been
> pulling my hair out on this one.
> Aaron Gillette
> Zope maillist - Zope@zope.org
> ** No cross posts or HTML encoding! **
> (Related lists -
> http://lists.zope.org/mailman/listinfo/zope-dev )