Sets in Python

Evil Bert bert at bertisevil.tv
Wed Sep 19 02:48:27 CEST 2007


sapsi wrote:
> 2) This is not related, but is there i neat way (without pop and list
> comprehension) to convert a set into a list? I say neat because i'm
> guessing using list comprehension might turn out be slow and there
> might be other methods which are faster.

a = set([1, 2, 3, 4])
b = list(a)



More information about the Python-list mailing list