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
You can use set difference operator, like this
test, empty = [{'', 'a'}, {'b', ''}], {''} print [x - empty for x in test] # [set(['a']), set(['b'])]