how to check if python is installed on mac

# To check python 3 version type in the terimnal:

python3 --version

# To check python 2 version just type:

python --version

# If any errors come up then that means python isn't installed on your
# system.

Here is what the above code is Doing:
1. It’s checking if the python version is 3.
2. If it is 3 then it’s printing a message saying that the script is running
on python 3.
3. If it isn’t 3 then it’s printing a message saying that the script is running
on python 2.
4. If there are any errors then it means that python isn’t installed on your
system.