I want to play a sound while the countdown is running

Viewed 40

I have a code which plays sound and a timer that decreases overtime but the problem is I don't know how to play the sound while the timer counts down.

    seconds = 10

for i in range(seconds):
    print(str(seconds-i) + " seconds remaining \n")
    t.sleep(1)
playsound('music.mp3')
1 Answers
seconds = 10

for i in range(seconds):
    print(str(seconds-i) + " seconds remaining \n")
    t.sleep(1)
    playsound('music.mp3')

Bruh -_- just put an tab space so that the music enters the for loop

Related