This time we want to create a little script to search for all the files in a directory, ask you to pick up one to be opened with the associated program in your OS.
import os def menu(): for n,each in enumerate(os.listdir()): print(n, each) ask = int(input("Number? > ")) os.startfile(os.listdir()[ask]) if __name__ == "__main__": menu()