Python is a programming language that is included in the standard macOS installation. If you have any programming questions about Python, ask them on Stack Overflow.
It is included in the standard macOS installation at
/usr/bin/python. This python.org page shows how to start.
The installation comes with many libraries that allow interaction with other applications using Apple events, in the same manner as AppleScript or calls to native libraries, standard internet protocols like HTTP, SMTP etc.