check python version from within python code example
Example 1: check python version
# To check Python version
python -V
----or----
python --version
Example 2: python check version
python --version
# To check Python version
python -V
----or----
python --version
python --version