Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- from itertools import *
- def transpose(matrix):
- return zip(*matrix)
- def uniq(lists):
- return [x for x in{y for y in lists}]
- def dict_merge(*x):
- return dict(chain.from_iterable(sym.items() for sym in x))
- def product(vec_1, vec_2):
- product = 0
- for a, b in zip(vec_1, vec_2):
- product += a * b
- return product
Advertisement
Add Comment
Please, Sign In to add comment