Andy Cheesman wrote:
> I've googled a bit for manipulation of
> sets into other data structure(lists, arrays) and not seen much. Is the
> only way of interconversion a brute force method?
> 
> i.e   a = set([1, 2, 3])
>       b = []
>       for thing in a:
>               b.append(thing)

No, a set is a sequence, you can convert it to a list directly:
b = list(a)

Kent
_______________________________________________
Tutor maillist  -  Tutor@python.org
http://mail.python.org/mailman/listinfo/tutor

Reply via email to