get rid of duplicate elements in list without set

Tino Wildenhain tino at wildenhain.de
Fri Mar 20 11:15:55 EDT 2009


thomasvangurp at gmail.com wrote:
> You could use:
> B=list(set(A)).sort()
> Hope that helps.

That would leave a B with value None :-)

B=list(sorted(set(A))

could work.

-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/x-pkcs7-signature
Size: 3241 bytes
Desc: S/MIME Cryptographic Signature
URL: <http://mail.python.org/pipermail/python-list/attachments/20090320/5b38c75d/attachment.bin>


More information about the Python-list mailing list