Once you have made a decision to install Python 2 or Python 3, you can download the latest version from the Python website at the following URL:
https://www.python.org/download/releases/
On running the downloaded file, Python is installed in the following directory unless explicitly mentioned:
- For Windows:
C:Python2.x
C:Python3.x
- For macOS:
/usr/bin/python
- For Linux:
/usr/bin/python
A Windows installation will require you to set the environment variables with the correct path.
To check the version of Python installed, you can run the following code:
import sys
print ("Python version:{}",format(sys.version))