new to coding and attemping to make a score board program for when a goal is scored I want text color to change then after 2 seconds revert back to original color. I added a 2 second sleep function but it seems to delay the entire process and not the color change.
# def actions that will take place when away team scores
def a_goal():
global awayscore
awayscore += 1
Label(main, text=awayscore, font='TkFixedFont 50 bold', fg='red', background= 'black').place(x=100, y=100)
time.sleep(2)
Label(main, text=awayscore, font='TkFixedFont 50 bold', fg='orange', background= 'black').place(x=100, y=100)