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 .union() Operation
- Discussions
Set .union() Operation
Set .union() Operation
Sort by
recency
|
784 Discussions
|
Please Login in order to post a comment
n = int(input()) e = set(map(int,input().split())) b = int(input()) f = set(map(int,input().split())) print(len(e.union(f)))
For Python3 Platform
eng = input() eng_ids = set(map(int, input().split()))
fr = input() fr_ids = set(map(int, input().split()))
print(len(eng_ids.union(fr_ids)))