Python has been around for decades and now becomes the most used machine learning and artificial intelligence programming language. Just for discussion, why it becomes the most effective tool for AI and ML currently?
I guess that is because why its taking over many other fields too: Rather easy to learn, highly adaptable to many problems/research fields because of a sheer endless package library, and in the specific case of ML because of nicely documented ones like TensorFlow, Scikit Learn, and Keras.
I think Python is one of the newest and more invested programming language today. It uses lessons learned and best practices of the other languages. So, it tries to find easy solutions today's problems such AI, ML etc.
In my opinion, Python is unbeatable in ease of use, readability, portability, simplicity and even beauty. It has positioned itself as the reference programming language for artificial intelligence and machine learning due to its simplicity and elegance.
Additionally, Python has a huge libraries with a large community support which allow executing more complex functions and tasks more easily than other languages. Python is a perfect language for any beginner programmer who is determined to learn on their own due to the ease of their syntax.
Python indeed is a very beginner-friendly language. It abstracts many of the peculiarities of "classical" programming languages like C/C++, like typed data and memory management, which beginners typically struggle with.
However, it's not any better suited for ML/AI than any other language. The point's rather that many such projects just require a "glue language" to put the different components together and move data between them.
Here the performance loss compared to a compiled application written in a lower level language is negligible. Python works well in this domain as nobody actually implements any processing-intense algorithm with it. If you do, you quickly notice the performance penalty you pay for the convenience. To give an example, the difference in performance of a Sobel filter implemented in pure Python is two orders of magnitude compared to a simple C++ implementation and even three orders of magnitude compared to optimized NEON-code (I ran that example on a Raspberry Pi).
There is really no such thing as an AI language (even Lisp and prolog aren't) . Python is an easy language to work with and so people build python interfaces for their products. Note that so call current AI is not really anything more than just another computer fad. AI fluctuates in popularity ( and helps sales) on period 7-10 years, then it loses to the next fad. The real AI is moving from computing to Neuroscience, Philosophy , Biology, Psychology, Engineering (eg Control and robotics) and even Mathematics.. (Python does have its tacky bits eg Classes, otherwise OK)