Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- def zip(a,b):
- return [(x, b[i]) for (i, x) in enumerate(a)]
- def zipwith(f, a, b):
- zipped = zip(a,b)
- f2 = lambda x: f(x[0],x[1])
- return map(f2, zipped)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement