Check Subset
-
Practice>Python>Sets>Check Subsethackerrank.com 2019. 3. 9. 05:13
hackerrank.comCheck SubsetProblem link : https://www.hackerrank.com/challenges/py-check-subset/problemDifficulty : EasyTipJust use difference(), it is all you should know to resolve it Solution cnt = int(input()) for _ in range(cnt): input() A = set(input().split(' ')) input() B = set(input().split(' ')) a1 = A.difference(B) if len(a1) > 0: print(False) else: print(True)