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
|
787 Discussions
|
Please Login in order to post a comment
n_eng = int(input()) s_eng = set(map(int,input().split())) n_french = int(input()) s_french = set(map(int,input().split())) print(len(s_eng.union(s_french)))
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