Advertisement
Guest User

subSet

a guest
Sep 23rd, 2014
272
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.22 KB | None | 0 0
  1. def isSubset(s1, s2):
  2. s3 = s1.union(s2)
  3. for i in s1:
  4. x = i
  5. print(x)
  6. for j in s3:
  7. y = j
  8. print(y)
  9. if x == y:
  10. return True
  11. return False
  12.  
  13. s1 = {1, 2, 3, 4, 5}
  14. s2 = {0, 1, 2}
  15. print(isSubset(s1, s2))
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement