title: How to run a python program in a loop with different arguments
body: <p>I am using <em>argparse</em> to pass arguments on the command line, while executing the program. There is one argument that I need to change every time I run the program. I was thinking of storing all the instances of that particular argument in a list and write a program that executes my python program,say <code>test.py</code> taking one instance of that list every time it runs.
  python test.py --arg1 a1 --arg2 a2</p>
  
  <p>List of instances of <strong>arg2</strong> : [a2_1,a2_2,a2_3].<br>
  I want to automate the process, such that the following gets executed:</p>
  
  <pre><code>python test.py --arg1 a1 --arg2 a2_1
  </code></pre>
  
  <p>followed by</p>
  
  <pre><code>python test.py --arg1 a1 --arg2 a2_2
  </code></pre>
  
  <p>then</p>
  
  <pre><code>python test.py --arg1 a1 --arg2 a2_3
  </code></pre>
  
  <p>automatically and I dont have to pass the next arguments manually every time one gets executed.<br>
  Thanks a lot</p>