def file_location(): root = tkinter.Tk() files = filedialog.askopenfilenames(parent=root,title='Choose files') files = root.tk.splitlist(files) return files