I'm wanting to play a sound while some text is being printed out, but how do I go about doing this at the same time? Here is what I have to work with.
import winsound as win
import sys
import time
text = "I like Pizza!"
for letter in text:
sys.stdout.write(letter)
sys.stdout.flush()
time.sleep(0.5)
gametheme = "Place where the sound is stored"
win.PlaySound(gametheme, win.SND_FILENAME)