I am creating a sort of a game where the player has to guess a word within a given time limit everything is working accept i dont know how do i run a timer and take input at the same time that too in a loop. I tried some code but it took input then ran the timer and asked input again so one happened after the other and not simultaneously How do i fix it
Here is what i tried
import time
def countdown(seconds):
while seconds > 0:
seconds -= 1
time.sleep(1)
seconds = 6
while seconds > 0:
input = ("guess word : ")
countdown(6)
^^ that is only a fraction of my code Full code here - https://sourceb.in/QYk1D9O2ZT