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
- Check Subset
- Discussions
Check Subset
Check Subset
Sort by
recency
|
904 Discussions
|
Please Login in order to post a comment
Here's my code:
T = int(input()) for i in range(T): A = int(input()) A_el = set(map(int, input().split())) B = int(input()) B_el = set(map(int, input().split())) print(A_el.difference(B_el) == set())
t = int(input()) for i in range(t): ai = int(input()) a = set(map(int, input().split())) bi = int(input()) b = set(map(int, input().split())) if a.issubset(b):print("True") else:print("False")