Advertisement
Guest User

Untitled

a guest
Jun 16th, 2019
62
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.29 KB | None | 0 0
  1. >>> l = [[0, 1], [0, 2], [1, 2], [1, 3], [0, 1, 2]]
  2. >>> l2 = [[4, 1], [4, 0], [1, 3], [1, 0], [4, 0, 1]]
  3. >>> all([any(i in x for i in y) for x, y in zip(l, l2)])
  4. True
  5. >>> l3 = [[5, 2], [5, 2], [3, 0], [0, 2], [5, 0, 2]]
  6. >>> all([any(i in x for i in y) for x, y in zip(l, l3)])
  7. False
  8. >>>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement