Python program to find number of processors in your computer

The maximum parallel processes can you run on computer is based on the number of processors or cores  in your computer. To find number of processors or cores  in your computer, cpu_count() function is used.

import multiprocessing as mp
print("Number of processors: ", mp.cpu_count())

No comments: