To install Python, do the following steps:
- Go to https://www.python.org/downloads/
- Download the latest version, e.g., v3.10.5.
- Double-click the downloaded .pkg (for Mac) file and follow the instructions to install Python.
- After the installation is completed, verify the version by invoking the following command in the command-line tool, e.g., Terminal (on Mac):