Your main.py is actually your prog0.py. Wrap the code within each of these files in a method definition:
def run():
print('in xxx....')
for i in range ...
In your main.py, you would then code:
from prog0 import run
run()
from prog1 import run
run()
from prog2 import run
run()
(you can name the method names like you wish and they can be different, this is not relevant, (e.g. run0, run1, run2) as long as you also change your main.py).
This will execute each script one after the next.
I would recommend that you search for a Python-tutorial, this is all basic Python stuff and spending some time learning about Python, especially its module and program structure, will save you a lot of time when it comes to implementing your ideas.