multiprocessing Basics¶ The simplest way to spawn a second process is to instantiate a Process object with a target function and call start() to let it begin working. import multiprocessing def worker(): """worker function""" print('Worker') if __name__ == '__main__': jobs = [] for i in range(5): p = multiprocessing.Process(target=worker) jobs.append(p) p.start() The output includes the word “Work
![multiprocessing Basics — PyMOTW 3](https://cdn-ak-scissors.b.st-hatena.com/image/square/fa184e06899e336ccb2076d6804e097c32257334/height=288;version=1;width=512/https%3A%2F%2Fpymotw.com%2F3%2F_static%2Flogo-large.png)