Mar-03-2021, 09:18 PM
Each time in your callback you mark the window to be removed from the grid. But nothing happens until your function exits and TK redraws the screen via tasks in mainloop.
On your last time, your function never exits, so TK never redraws the screen. Try adding a call to window4.update() to redraw the screen.
On your last time, your function never exits, so TK never redraws the screen. Try adding a call to window4.update() to redraw the screen.