xxxxxxxxxx
#checking using cmd
python --version
#using python script to get version
import os
os.system("python --version")
xxxxxxxxxx
# To check your Python version in the command line use:
python --version
# To check your Python verson inside a script use:
import sys
print(sys.version)
xxxxxxxxxx
# new way to know about python version in your windows pc,follow the steps below
step-1:Open CMD
step-2:write py --version
Congratulations!Now you know the version of python in your PC.
xxxxxxxxxx
Step 1: Type Command Prompt on search icon near the windows icon
Step 2: On Command Prompt Execute the below command
Step 3: python --version