I have two sets set([1,2,3]
and set([4,5,6]
. I want to add them in order to get set 1,2,3,4,5,6
.
I tried:
b = set([1,2,3]).add(set([4,5,6]))
but it gives me this error:
Traceback (most recent call last):
File "<ipython-input-27-d2646d891a38>", line 1, in <module>
b = set([1,2,3]).add(set([4,5,6]))
TypeError: unhashable type: 'set'
Question: How to correct my code?