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: 316

Filed under:
|

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

Related posts about set

Related posts about python