The title says it all, I want to programmatically get the version of Selenium I have installed on my Python environment.
You can try:

pip list
conda list

or for example on MAC:

brew list

And then check if and what version is in your installed package list.
For conda you might have different environments. Change it by conda activate myenv where myenv is the name of your second or more test environments.
How do I retrieve the version of Selenium currently installed, from Python