title: Python Entry Widget data auto update and save in a text file
body: <p>I have a text file which contains four words line by line. suppose for example:</p>
  
  <pre><code>cat
  mat
  rat
  hat
  </code></pre>
  
  <p>I want to show these words in an Entry widget. Like "cat" in first Entry widget, "mat" in second Entry widget and so on so. Now, if I update the contents of any Entry widget then it should also auto update in the text file. I wrote some codes to display Entry widgets but after that am not getting how to achieve this?</p>
  
  <pre><code>from tkinter import *
  top = Tk()
  
  with open('C:/Users/jaykr/Desktop/data.txt') as file:
      data = file.read().split("\n")
  
  for i in range(len(data)):
      Entry(top).grid(row=i, column=0)
  
  top.mainloop()
  </code></pre>