Introduction to parallelism in Python
Executing tasks sequentially (where the second one starts after the first one finishes) is required in some situations. For example, maybe the input of the second function relies on the output of the first one. If that's the case, these two functions (processes) can't be executed at the same time.
But more often than not, that's not the case. Just imagine your program is connecting to three different API endpoints before the dashboard is displayed. The first API returns the current weather conditions, the second one returns the stock prices, and the last one returns today's exchange rates. There's no point in making the API calls one after the other. They don't rely on each other, so running them sequentially would be a huge waste of time.
Not only that, but it would also be a waste of CPU cores. Most modern PCs have at least four CPU cores. If you're running things sequentially, you're only using...