Add list to set?

Tested on Python 2.6 interpreter: >>> a=set(‘abcde’) >>> a set([‘a’, ‘c’, ‘b’, ‘e’, ‘d’]) >>> l=[‘f’,’g’] >>> l [‘f’, ‘g’] >>> a.add(l) Traceback (most recent call last): File “<pyshell#35>”, line 1, in <module> a.add(l) TypeError: list objects are unhashable I think that I can’t add the list to the set because there’s no way Python … Read more