title: Run multiple python files simultaneously and terminate all when one has finished
body: <p>I need to run multiple python files simultaneously, but when one finishes, kill all of the rest. I only need to know the output of the python file that finishes first. After much trial and error, I have decided to use a bash file (I am running Ubuntu) to start all of the files simultaneously, however, I cannot stop all of them once the first one is done.Please help, thanks!!! I have tried many answers I have found online with no success. I have even written a python file to kill other python files which works when started from the terminal but not when called from the bash file or another python file. I feel like I am over complicating the problem. Any Help is greatly appreciated.</p>
  
  <p>Assuming I take in a variable named pass and I pass that to each file here are the commands I want to run in parallel:</p>
  
  <pre><code> read pass
   python3 1.py "$pass"
   python3 2.py "$pass"
   python3 3.py "$pass"
   python3 4.py "$pass"
   python3 5.py "$pass"
   python3 6.py "$pass"
   python3 7.py "$pass"
   python3 8.py "$pass"
   python3 9.py "$pass"
  </code></pre>