How do I generate sound using Python3?
Here is it ... install pyaudo to play the generated sine signal, install numpy to help you with arrays and math, install matplotlib to plot ...

I wrote this code quickly just to show how to do... some steps are commented in the code, this will play one generated signal in the choose frequency, concatenate all vectors signals and play using pyaudio at the end im generating the FFT that show the frequencies in the generated signal...

# -*- coding: cp1252 -*-
from struct import pack
import pyaudio
import numpy as np
import matplotlib.pyplot as plt

Fs = 26500
freq1 = 125
freq2 = 250
freq3 = 500
seconds=3
nsamples = Fs*seconds
signal1 = np.arange(nsamples)
signal2 = np.arange(nsamples)
signal3 = np.arange(nsamples)
signal1 = np.sin(2 * np.pi * freq1 * signal1 / Fs)
signal2 = np.sin(2 * np.pi * freq2 * signal2 / Fs)
signal3 = np.sin(2 * np.pi * freq3 * signal3 / Fs)

#join all signals Im not crossfading and
#I'm not worrying about the continuity of the phases
sout=np.concatenate((signal1, signal2, signal3), axis=None)


# Initialize PyAudio
pyaud = pyaudio.PyAudio()

# Open input stream, 32-bit mono at 26500 Hz
stream = pyaud.open(format =  pyaudio.paFloat32,
                channels = 1,
                rate = Fs,
                output = True)


#play all vector, maybe can be nice if you put it in one loop
out = pack("%df"%len(sout), *(sout))
stream.write(out)

stream.stop_stream()
stream.close()

pyaud.terminate()


#start plot Frequencies (FFT)

wsignal=sout*np.hamming(len(sout)); 
Fourier=abs(np.fft.rfft(wsignal))


NyquistTeorema = (Fs / 2)

MinFrequencia=NyquistTeorema / (len(sout) / 2);

Frequencies=np.linspace(MinFrequencia, NyquistTeorema, num=(len(sout) / 2))

plt.figure(1)
plt.title('Fourier')
plt.plot(Frequencies,Fourier[0:len(Frequencies)])


plt.figure(2)
plt.title('Fourier Zoom')
plt.plot(Frequencies[0:5000],Fourier[0:5000])



plt.show()


The final plot: