How can I convert a set to a list in Python? Using
a = set([\"Blah\", \"Hello\"])
a = list(a)
doesn\'t work. It gives me:
         
        
This will work:
>>> t = [1,1,2,2,3,3,4,5]
>>> print list(set(t))
[1,2,3,4,5]
However, if you have used "list" or "set" as a variable name you will get the:
TypeError: 'set' object is not callable
eg:
>>> set = [1,1,2,2,3,3,4,5]
>>> print list(set(set))
Traceback (most recent call last):
File "", line 1, in 
TypeError: 'list' object is not callable
  Same error will occur if you have used "list" as a variable name.