title: Changing a button text in tkinter - 'NoneType' object is not subscriptable
body: <p>I am trying to have Button1 change the text on it from 'hi' to 'bye' when it is pressed, and back again when pressed a second time.</p>
  
  <p>Here is my code:</p>
  
  <pre><code>from tkinter import *
  
  def toggletext():
    if Button1["text"] == "hi":
      Button1["text"] = "bye"
      Game.update()
    else:
      Button1["text"] = "hi"
      Game.update()
  
  Game = Tk()
  Game.wm_title("title")
  Button1 = Button(text="hi",fg="white",bg="purple",width=2,height=1,command=toggletext).grid(row=0,column=0)
  Button2 = Button(fg="white",bg="purple",width=2,height=1).grid(row=1,column=0)
  Button3 = Button(fg="white",bg="purple",width=2,height=1).grid(row=0,column=1)
  Button4 = Button(fg="white",bg="purple",width=2,height=1).grid(row=1,column=1)
  
  Game.mainloop()
  </code></pre>
  
  <p>I get this error when I press Button1:</p>
  
  <pre><code>Exception in Tkinter callback
  Traceback (most recent call last):
    File "C:\Python34\lib\tkinter\__init__.py", line 1533, in __call__
      return self.func(*args)
    File "C:\Users\User1\Desktop\gridtest2.py", line 4, in toggletext
      if Button1["text"] == "hi":
  TypeError: 'NoneType' object is not subscriptable
  </code></pre>