Here is a program on Cournot competition on Github:
http://janboone.github.io/competition_policy_and_regulation/Collusion_Cournot/Collusion_Cournot.html
It encompasses both numerical aspects and graphical aspects, and makes clear that SciPy, Numpy and Matplotlib are needed ( of course, what you need depends on your specific model) .
SciPy and Numpy are scientific and numerical libraries of Python.
Matplotlib is the graphical library, and enables you to plot graphs and represent numerical solutions as graphs.
Changing parameters in the equations of the program you can plot the relevant solution as graphs, as in the following simulation of a Cournot model:
https://www.kaggle.com/code/hrishitabapuram/cournot-model-simulation
Below, some examples of programs for Cournot’s model I found, without graphical representations:
https://data88e.org/textbook/content/07-game-theory/cournot.html
Here is another program on Github, that includes also the case of n companies:
https://ispanos.github.io/CournotGame/
Adapting some of the program above to your needs, you can write down your simulation (of course, nothing ensures that the programs above are completely correct).
But, of course, the first step is to write down your equations.
Maybe the most complicated part is the graphical part, if you need it.
In this case you have to know a little Matplotlib, if you don’t already know it.
Have you a Python editor? I suppose you have, but I give a reference:
You can download Anaconda, a free software with several applications as Phyton and R, the name of the Python editor on Anaconda is Spider.
There are in it, of course, Scipy, Numpy and Matplotlib.
If you need a good reference as a guide for numerical and scientific Python, Matplotlib included, you can look at Robert Johansson, Numerical Phyton-Scientific Computing and Data Science Applications with Numpy, SciPy and Matplotlib, Apress, 2019.
But there is a lot of documentation for Python online, not very easy to search in, though, very wide.
Post Scriptum. If you are a beginner in Phyton and you want to learn it, you need or a course or a book as guide for general Python (not scientific and numeric Python alone), documentation online drives you crazy.
I studied, some years ago, Python on lectures notes, but they are not in English, and on Downey, Think Phyton, a wide-spread book, but I don't like it very much, there is a new book Hunt, A Beginners Guide to Phyton 3, I don't know it, but it is published by Springer and should be reliable.