Is this a bug? I don't know where to start

Jeff Epler jepler at unpythonic.net
Thu Jun 23 01:57:20 CEST 2005


Your list "targets" contains some values twice.

>>> targets=[97,101,139,41,37,31,29,89,23,19,8,13,131,19,73,97,19,139,79,67,61,17,113,127]
>>> for t in set(targets):
...     if targets.count(t) > 1: print t
... 
97
139
19

It looks like the "duplicated" items in the output contain one of the
duplicated items from the input.

Jeff
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 196 bytes
Desc: not available
URL: <http://mail.python.org/pipermail/python-list/attachments/20050622/bb115e57/attachment.sig>


More information about the Python-list mailing list