Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Simple multiprocessing/threading example in python?
- def myfunct(d):
- facto = 1
- for x in range(d):
- facto*=x
- return facto
- cases = [1,2,3,4] # and so on
- for d in cases: #loop to parallelize
- print myfunct(d) # or to store on a common list when calculated
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement