Max M wrote:
Eric Pederson wrote:
listA = list(Set(listA))
As of 2.4, set is a built-in type (2.3 had Set in module sets).
Another 2.4-ism is "sorted", which might very well be the way you
want to turn the set into a list:
listA = sorted(set(listA))
for this particular use, you can define sorted in 2.3 as:
def sorted(iterable):
result = list(iterable)
result.sort()
return result
The full sorted functionality can be (and has been) defined in 2.3,
but just using 2.4 would be a better bet.
--Scott David Daniels
[EMAIL PROTECTED]
--
http://mail.python.org/mailman/listinfo/python-list