I think this may be related to set being mutable.
mutable
Basically, I can remove an element from a set using set.discard(element). However, set.d
set.discard(element)
set.d
This?(duplicate of @thefourtheye answer)
set subtraction operation returns set data.
set
test = [{'', 'a'}, {'b', ''}] print [x - {''} for x in test] print test
Output:
[set(['a']), set(['b'])] [set(['a', '']), set(['', 'b'])]