Guest User

Untitled

a guest
Oct 23rd, 2017
66
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.14 KB | None | 0 0
  1. from multiprocessing import Pool
  2.  
  3. def f(x):
  4. return(x*x)
  5.  
  6. if __name__ == '__main__':
  7. with Pool(5) as p:
  8. print(p.map(f,[1,2,3]))
Add Comment
Please, Sign In to add comment