Python a programming language that is used for application development, robotics, controlling hardware, websites (with Django), and it is used for automation (programming routine tasks to run on applications)
To install the latest version of Python (version 3~) on your computer, follow the instruction on their official site Python.org
On the Mac OSX operating system, Python 2.7 is already installed. So, you will need to install Python 3 manually. Follow the installation instructions on their official site.
You can program with Python using these online compilers:
https://repl.it/
https://py3.codeskulptor.org/