HackerRank Python - Check Subset




You are given two sets, A and B.
Your job is to find whether set A is a subset of set B.

If set A is subset of set B, print True.
If set A is not a subset of set B, print False.



  1. # Enter your code here. Read input from STDIN. Print output to STDOUT
  2. for i in range(int(input())):
  3. a = int(input()); A = set(input().split())
  4. b = int(input()); B = set(input().split())
  5. print((A & B) == A)
Please click on the like button if it worked

Solution not working or have any suggestions? Please send an email to [email protected]


donate a cup of tea :)


Join Our Facebook Group

Share this solution






codesadda.com

Codesadda.com is your home of programming solutions, tutorials, video tutorials and much more. Sign Up for our weekly newsletter to get update about new content.

Like us on Facebook | Connect with us on LinkedIn | Subscribe our Channel on Youtube