como abrir o diálogo de arquivos no Tknter

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