title: grid()/grid_remove() functions don't do i would expect
body: <p>So I am making a "game", where there is a grid with random number from 1 to 9 in each cell. And when you move the cursor on a cell, and press the number on your keyboard which is written in the cell, it should disappear, and another cell should reappear. I am trying to use <code>grid_remove()</code> for hide the object, and <code>grid()</code> to show it, but it doesn't work as I would like to it. Firstly I make a 3x3 grid, and i remove some of its cells, but the shown cells can be shifted to the place of a hidden one and I would avoid of this. In this code, I write the index in the each cell (instead of a random number 1-9). I highlight a part of the code in the beginning, where I remove the cells at the program starting, then i past the whole code.</p>
  
  <p>Choosing which indexes will be removed (I think it should be ok):</p>
  
  <pre><code>exist=[]
  t=0
  for k in range(0,int((2*size*size)/3)):
      while t in exist:
          t=randint(0,size*size-1)
      print(t)
      exist.append(t)
  </code></pre>
  
  <p>Removing some of the cells, right after making them:</p>
  
  <pre><code>button[index].grid(row=i, column=j)
  if index in exist:
      button[index].grid_remove()
  </code></pre>
  
  <p>And my whole code finally:</p>
  
  <pre><code>from random import randint
  import tkinter
  from tkinter import Button
  from tkinter import font
  top = tkinter.Tk()
  top.title("Game")
  top.geometry("500x500")
  
  class table:                            
      def __init__(self,size):            
          self.size=size
          index=0
          def onClick(index):
              if button[index].cget("bg")=="Red":
                  button[index].config(bg="Blue")
              else:
                  button[index].config(bg="Red")
          def key(event):
              if event.widget.cget("text")==event.char:
                  event.widget.config(text=str(randint(1,9)))
                  event.widget.show=False
                  f=randint(0,size*size-1)
                  if not button[f].winfo_exists():
                      button[f].grid()  #row=int(f/size), column=f%size
          def enter(event):
              event.widget.focus_set()
          def leave(event):
              event.widget.config(bg="Red")
          button=[]
          exist=[]
          t=0
          for k in range(0,int((2*size*size)/3)):
              while t in exist:
                  t=randint(0,size*size-1)
              print(t)
              exist.append(t)
          for i in range(0, size):        
              for j in range (0,size):
                  button.append(Button(top,command=lambda index=index: onClick(index),height=5,width=10,bg="Red",font=5,text=str(index)))
                  button[index].bind("&lt;Key&gt;",key)
                  button[index].bind("&lt;Enter&gt;",enter)
                  button[index].bind("&lt;Leave&gt;",leave)
                  button[index].grid(row=i, column=j)
                  if index in exist:
                      button[index].grid_remove()
                  index=index+1    
  racs=table(3)
  top.mainloop()
  </code></pre>