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
|
762 Discussions
|
Please Login in order to post a comment
n = int(input()) students = set(map(int, input().split())) b = int(input()) be = set(map(int, input().split()))
print(len(students | be))
Here's my code:
english = int(input()) english_std = set(list(map(int, input().split()))) france = int(input()) france_std = set(list(map(int, input().split()))) print(len(english_std.union(france_std)))