Ho do I get the contents of a set() in list[] form in Python?
set()
list[]
I need to do this because I need to save the collection in Google App Engine
>>> a = [1, 2, 3, 4, 2, 3] >>> b = set(a) >>> b set([1, 2, 3, 4]) >>> c = list(b) >>> c [1, 2, 3, 4] >>>