import platform
print(platform.python_version())
# To check Python version
python -V
----or----
python --version
# 2 ways to check python version
# In the terminal/cmd write the following:
# Way 1
python -V
# Way 2
python -c "import sys; print(sys.version)"
python --versrion
print(sys.version_info)
# sys.version_info(major=3, minor=8, micro=3, releaselevel='final', serial=0)
import platform
print(platform.python_version())
import sys
print(sys.version)
python3 --versionpip3 --version
# To check your Python version in the command line use:
py --version
python3 -v