Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- def diff(a, b):
- ans = []
- for a_item, b_item in zip(a, b):
- ans.append(int(b_item and not a_item))
- return ans
- def diff_list_comp(a, b):
- return [int(b_item and not a_item) for a_item, b_item in zip(a, b)]
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement