Advertisement
Guest User

Untitled

a guest
Aug 21st, 2019
81
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.22 KB | None | 0 0
  1. def diff(a, b):
  2. ans = []
  3. for a_item, b_item in zip(a, b):
  4. ans.append(int(b_item and not a_item))
  5. return ans
  6.  
  7. def diff_list_comp(a, b):
  8. 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