DEV Community

Discussion on: Multithreading vs Multiprocessing in Python 🐍

Collapse
 
mdah profile image
m-dah

Declare the "result" variable as global in main and threads so it does not create a new local variable for each thread.