How to connect multi-threading(python)?

I have a list of items
how do I turn on multi-threading?
code example:
its = []
for elem in items:
 its.append(get_dict(elem))
March 23rd 20 at 19:04
1 answer
March 23rd 20 at 19:06
Zap multiprocessing for depression.

If unless can you dig up such tasks, I do not recommend to use asyncio until you enter will turn gray.

Try:
from multiprocessing import Pool

def get_dict(elem):
 #here cool logic get_dict
 #you can ask it to write to csv

p = Pool(5) #This "process" for 10, 20, 1000000000000
p.map(get_dict, items) # map will apply your get_dict function to each element in the list items


At first impressive, and looks clear.

https://docs.python.org/2/library/multiprocessing.html

Find more questions by tags multithreadingPython