# https://stackoverflow.com/a/6537563 import winsound frequency = 2500 # Set Frequency To 2500 Hertz duration = 1000 # Set Duration To 1000 ms == 1 second winsound.Beep(frequency, duration)
Here is what the above code is Doing:
1. Importing the winsound module.
2. Setting the frequency to 2500 Hertz.
3. Setting the duration to 1000 milliseconds.
4. Playing the sound.