I have made a card matching game using python, and I need it so that when two cards are selected, they are shown for a few seconds and then the code executes to get rid of them or return them. I have tried using time.sleep, however this just freezes my program without displaying the second card. Are there any other modules or techniques I can use to make this happen?
1 Answer
Time.sleep suspends the program. Since events are still being pumped, there is nothing to process the event.
Take a look at this: How to create a timer using tkinter?