title: How to select a directory and store it into a variable in tkinter?
body: <p>I have  tkinter GUI. I like to have a textbox and a button. On clicking that button  a file explorer should open and finally a directory can be selected. This path has to be shown in the textbox.</p>
  
  <p>code :</p>
  
  <pre><code>from tkinter import *
  from tkinter import ttk
  from tkinter import filedialog
  gui = Tk()
  gui.geometry("400x400")
  gui.title("FC")
  a = Label(gui ,text="Enter name").grid(row=0,column = 0)
  E = Entry(gui).grid(row=0,column=1)
  folder_selected = filedialog.askdirectory()
  c = ttk.Button(gui ,text="find").grid(row=4,column=0)
  gui.mainloop()
  </code></pre>