I am just learning Python. I have a program that will choose a random image each time you click the mouse!! How do I clear the window so images don't stack. I am sure I am asking this question wrong because google is no help :(
Thank you and here is the code:
from graphics import*
import random
import os
win = GraphWin("My Window", 500, 500)
for x in range(5):
cards = ["1.gif","2.gif","3.gif"]
rand_card = random.choice(cards)
img = Image(Point(250, 250), rand_card)
win.setBackground('Black')
img.draw(win)
win.getMouse()