I've got a simple question. Essentially I want to run a function on a list of lists at the same time or in parallel.
Here is essentially what I'm working with
def func(x):
print(x)
for objectList in space:
for subObject in objectList:
func(subObject)
I'd ideally like to be able to have func()
run on every objectList
at once. I know (actually I don't, which is why I'm asking how to do this) this is threading or parallelism but this is my first attempt at such.
My question is, is there a module or built in function in python or standard way to accomplish this task?
And sorry if I somehow broke a rule on this site or something or if you think this question is stupid or a duplicate or whatever.