Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- def is_comb(l1, l2):
- b = len(l1)
- if b != len(l2): return False;
- if not b: return True;
- if l1[0] in l2:
- l2.remove(l1[0])
- return is_comb(l1[1:], l2);
- return False
- def find_it(S, T):
- return any(is_comb(T, i) for i in S);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement