'Using integer variables in Subprocess.run

I am currently coding a pipeline in python with subprocess.run. I have loops to generate variables that I have to test. The structure of the code is something like for variable in range(n): subprocess.run(["%s -d variable" %(something)], shell = True). But my results always show that the variable had reset to 1. What should I instead do such that the loop will work?



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source