Advertisement
Guest User

Untitled

a guest
Jul 21st, 2019
88
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.39 KB | None | 0 0
  1. def different(lists):
  2.     sum_ = 0
  3.     collection_ = []
  4.     for list_ in lists:
  5.         for element in list_:
  6.             collection_.append(element)
  7.     set_collection = set(collection_)
  8.     sum_ += len(set_collection)
  9.     return sum_
  10.  
  11.  
  12. print(different([[1, 0, 1], [0, 1, 0]]))
  13. print(different([[32, 12, 52, 63], [32, 64, 67, 52],
  14.                  [64, 64, 17, 34], [34, 17, 76, 98]]))
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement