how could i make the function to do the colours red, yellow and green for 5 sec delays and make the loop keep on going?
def trafficLights():
win = GraphWin()
red = Circle(Point(100, 50), 20)
red.setFill("black")
red.draw(win)
amber = Circle(Point(100, 100), 20)
amber.setFill("black")
amber.draw(win)
green = Circle(Point(100, 150), 20)
green.setFill("black")
green.draw(win)
while True:
import time
time.sleep(5)