You are viewing a single comment's thread. Return to all comments →
def func(a,b): z=b.intersection(a) if(z==a): return True else: return False
def s(p): d=set() l=input().split(" ") for i in range(p): d.add(l[i]) return d
n=int(input())
for i in range(0,n) : a=set() b=set() a=s(int(input())) b=s(int(input())) print(func(a,b)) 1. > *
Seems like cookies are disabled on this browser, please enable them to open this website
Check Subset
You are viewing a single comment's thread. Return to all comments →
def func(a,b): z=b.intersection(a) if(z==a): return True else: return False
def s(p): d=set() l=input().split(" ") for i in range(p): d.add(l[i])
return d
n=int(input())
for i in range(0,n) : a=set() b=set() a=s(int(input())) b=s(int(input())) print(func(a,b)) 1. > *