How to clear Tkinter Canvas?
Every canvas item is an object that Tkinter keeps track of. If you are clearing the screen by just drawing a black rectangle, then you effectively have created a memory leak — eventually your program will crash due to the millions of items that have been drawn. To clear a canvas, use the delete method. … Read more