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 Strict Superset
- Discussions
Check Strict Superset
Check Strict Superset
Sort by
recency
|
1172 Discussions
|
Please Login in order to post a comment
set_A = set(map(int,input().split())) n_numbers = int(input()) flages = True for _ in range(n_numbers): set_n = set(map(int,input().split()))
print(flages)
Here's my solution that does not require an additional data structure to track the results of each comparison. This may be preferable when you do not want the additional memory overhead as well as the additional loop over the results. This also ends the main loop faster as it can exit as soon as any False is found.