I have a high CPU usage code in Python that I want to split among cores so that the code is completed faster, e.g.
for i in range(1000):
for j in range(1000):
for k in range(1000):
for l in range(1000):
print i, j, k, l
The script will have to run a trillion times on a single core. Which module in Python would allow be to run the processes parallel on multiple cores and how? I have seen some other answers but what would be the easiest way to split the above code among 8 cores?