So I am trying to open a file using tkinter dialogue. I want the location of the file selected. Is there any way I can get it? This is my code:
from tkinter.filedialog import asksaveasfile, askopenfile
root =tk.Tk()
files = [('All Files', '*.*'), ('Python Files', '*.py'), ('Text Document', '*.txt')]
file = askopenfile(mode ='r', filetypes = files, defaultextension = files)