Not too sure why you would want to do it this way, but here goes.
The TLDR:
First, you'll want to parse the argument dynamically at runtime (not just the char 'i' in your string!) So try,
for i in ['string1', 'string2']:
os.system("python scriptWhichPrintsInput.py {}".format(i))
...
i
- see: the docs here on string formatting.
- also fixed (I assume typo) on your strings by closing the apostrophes.
Then, I would assume, your other python script is some function, foo(), that takes an input, i, such as;
foo(i, *args, **kwargs):
# insert your script function here...
pass
The Long Way:
This is what I'd probably do instead.
Rather than parsing a string representation of my script with the os dependency, I'd make the script importable (call it scriptWhichPrintsInput.py) then just make sure it's on my Python path (read more here). Such as,
# your scriptWhichPrintsInput.py file
foo(i, *args, **kwargs):
# do something with your input...
print(i)
return
Then in your other script (as above),
# your scriptWhichPrintsInput.py file
from .scriptWhichPrintsInput import foo if your script is in the same folder, easy!
for i in ['string1', 'string2']:
foo(i)
...
i # do whatever you need to do here!
os.system? Useimportinstead.