Running a program
TimiA (0)

I have created multiply python files however i am only able to run the first program ( Is there any way of specifing the file i want to run everytime i want to run it?

You are viewing a single comment. View All
ash15khng (393)

You'll have to move the code in somewhere else first.
Then, add this in

a = input("Name of file to run (without py extension): ")

__import__(a) is just a function that imports your input, running your code.