mleeds at mlp.com
Thu Mar 17 20:08:09 CET 2005
I have a function uniqueList that is below :
for temp in origList:
nodups[temp] = None
When used in the following context :
industryList = uniqueList(jpbarradata[group])
where jpbarradata[group] might look like
["AAA BC",BBB KK","CCC TD","AAA KP","CCC TD"]
,the function works in the sense that it would return
["AAA BC","BBB KK","CCC TD",AAA KP"]
because CCC TD is duplicated.
But, I also want it to get rid of the AAA KP because
there are two AAA's even though the last two letters
are different. It doesn't matter to me which one
is gotten rid of but I don't know how to change
the function to handle this ? I have a feeling
it's not that hard though ? Thanks.
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Python-list