In this HackerRank Check Strict Superset problem solution, You are given a set A and n other sets. Your job is to find whether set A is a strict superset of each of the N sets. Print True, if A is a strict superset of each of the N sets. Otherwise, print False. A strict superset has at least one element that does not exist in its subset.

HackerRank Check Strict Superset in python problem solution

HackerRank Check Strict Superset in python problem solution

A = set(raw_input().split())
n = int(raw_input())
flag = "True"
for i in range(n):
    mySet = set(raw_input().split())
    if len(mySet) == len(A) or len(mySet - A) > 0:
        flag = "False"
print flag