from tkinter import filedialog text_file=filedialog.askopenfilename(initialdir="D:/IT related folders and documents/",title="Open Text File",filetypes=(("Text Files", "*.txt"),))