title: How to Display a file's text in python tkinter text widget
body: <p>folks, I'm trying to display a text file with python on GUI using python(version - 3.5) tkinter, however I'm finding some difficulties while displaying the text from the file in text widget of tkinter. can someone guide me how to do it.</p>
  
  <p><strong>MY CODE:</strong></p>
  
  <pre><code>configfile = Text(f3, wrap=WORD, width=45, height= 20)
  filename='/etc/hosts'
  file = open(filename,'r')
  f = file.readlines()
  configfile.insert(INSERT,[print(i) for i in f])
  configfile.pack(fill="none", expand=TRUE)
  </code></pre>
  
  <p><strong>Note:</strong> I'm just using print for now. I want to display it in the text widget instead of printing in cli. Also I've omitted posting the full source code in order to avoid confusions since I'm bit new to tkinter and python.</p>
  
  <p>someone please guide me how. Thanks in advance :-)</p>