Counting removed items in a Set in Python
Posted
by heapzero
on Stack Overflow
See other posts from Stack Overflow
or by heapzero
Published on 2010-03-25T19:27:14Z
Indexed on
2010/03/25
19:33 UTC
Read the original article
Hit count: 339
Given two sets
a = [5,3,4,1,2,6,7]
b = [1,2,4,9]
c = set(a) - set(b)
# c -> [5,3,6,7]
is it possible to count how many items were removed from set 'a' ?
© Stack Overflow or respective owner