I have 10 python file (1.py, 2.py, 3.py .... 10.py) i want to start random with python script, with while true. For ex. script start random py file (4.py) after finish the commands start again new random file (1.py) I want it to spin like this forever.
I try with this command but not working.
while True :
p = subprocess.Popen(['python', 'randint(1,10).py'])
Script give error
python: can't open file '<randint<1,3>>.py':