Guest User

Untitled

a guest
Aug 15th, 2018
71
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.19 KB | None | 0 0
  1. urls = ['a','b','c']
  2. y = '0'
  3.  
  4. def f(x):
  5. global y
  6. return x + y
  7. if __name__ == '__main__':
  8. y = '1'
  9. with Pool(2) as pool:
  10. results = pool.map(f, urls)
  11. print(results)
Add Comment
Please, Sign In to add comment