title: Is there a Tkinter (Python 3.7) function that directs text output to the created window instead of to the command line?
body: <p>I'm learning Tkinter so that I can set up a GUI for a personal project. While doing so I can't figure out how to have text results show up in the created window instead of in the command line.</p>
  
  <p>I tried reading up on the Text() function, but a lot of the results that came up weren't explained very well.
  I am using python 3.7 on windows 10.</p>
  
  <pre><code>from tkinter import *
  root = Tk()
  
  def printName():
      print('My name is Sam')
  
  button = Button(root, text='Print my name', command=printName)
  button.grid()
  
  root.mainloop()
  </code></pre>
  
  <p>Once the button has been clicked I want the output of the printName function to be shown in the created window instead of being shown on the command line. The actual output of the program once the button is clicked is going to the command line instead of the window.</p>