I have 

>>> listA=[1,2,3,4,5,4,3,4,3,2,1]

and I want a list of only the unique members.

This seems inefficient, but works fine over my small sample lists:

>>> listA=[a for a in set(listA)]


Is there a more efficient approach for cases where listA is large?






Eric Pederson
:::::::::::::::::::::::::::::::::::
domainNot="@something.com"
domainIs=domainNot.replace("s","z")
ePrefix="".join([chr(ord(x)+1) for x in "do"])
mailMeAt=ePrefix+domainIs
:::::::::::::::::::::::::::::::::::

-- 
http://mail.python.org/mailman/listinfo/python-list

Reply via email to