fork download
  1. from itertools import starmap
  2.  
  3. def mag(a, b, c):
  4. # something sophisticated
  5. return (a+b)*c
  6.  
  7. a = [1, 5, 7]
  8. b = [4, 8, 3]
  9. c = [2, 6, 3]
  10. V = [10, 78, 30]
  11.  
  12. assert list(starmap(mag, zip(a,b,c))) == V
Success #stdin #stdout 0.01s 27672KB
stdin
Standard input is empty
stdout
Standard output is empty