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
|
1177 Discussions
|
Please Login in order to post a comment
But this is possible with a heck lot of parantheses
I prefer this
setA = set(input().split()) n = int(input()) for _ in range(n): subset = set(input().split()) if subset.issubset(setA) == False or (subset.issubset(setA) == True and len(subset) == len(setA)) : print(False) break else: print(True)
For Python3 Platform