We use cookies to ensure you have the best browsing experience on our website. Please read our cookie policy for more information about how we use cookies.
- Prepare
- Python
- Sets
- Set .difference() Operation
- Discussions
Set .difference() Operation
Set .difference() Operation
Sort by
recency
|
377 Discussions
|
Please Login in order to post a comment
u = int(input()) d = set(map(int,input().split())) h = int(input()) o = set(map(int,input().split())) print(len(d-o)) or print(len(d.difference(o)))
For Python3 Platform
Here is HackerRank Set .difference() Operation in Python solution - https://programmingoneonone.com/hackerrank-set-difference-operation-solution-in-python.html