This is the input:
x = [{1, 2, 3}, {2, 3, 4}, {3, 4, 5}]
and the output should be:
{1, 2, 3, 4, 5}
I tried to use set().union(x)
but this is the error I'm getting:
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
TypeError: unhashable type: 'set'