Python sets: difference() vs symmetric_difference()
If A and B are sets A – B is everything in A that’s not in B. >>> A = {1,2,3} >>> B = {1,4,5} >>> >>> A – B {2, 3} >>> B – A {4, 5} A.symmetric_difference(B) are all the elements that are in exactly one set, i.e. the union of A – … Read more