使用CPU多核进行并行运算
import multiprocessingdef function(x): return(x * x) arg_list = [1, 3, 5, 7]cores = multiprocessing.cpu_count()pool = multiprocessing.Pool(processes=cores)for result in pool.imap(functi...