Python is becoming one of the most popular languages. And with all the backing from big corporations, it will only get faster and more ecosystem. Even when performance matters, the worst case is to write a small bit of your application in Go/Rust/C.
If you are creating a new product today, why would you not choose Python?
However, there are many cases where it can't do the job, and in those cases, the question is obviously, because it can't do the job.
I won't entertain you with a list (and following nitpicky discussion on why I'm wrong about every single item on it) of cases where it won't do the job.
E.g.: I'm developing a software (python + django) that need a component to run on multiple OS (mostly linux but also windows and some unix) that I can't directly control. I'm learning golang for this specific purpose because doing this in python is just insane.
We all say choose the tools best for the job or those that work for you. But the fact is that different tools can do the same job and can work for you. Like I want to build a simple API backend, I can code in Python, Elixir, Go, Rust, Clojure Typescript, OCaml and F#. What should I do then?
My point here is for general-purpose applications, and you know a few programming languages pretty well, it seems choosing Python is the more sensible.
Which is kinda sad, really.
No type safety.
GIL (yes, they are working on it).
Slow execution.
Terrible packaging and deployment: should you use pip, pipenv, poetry, conda, setuptools, hatch, micropipenv, PDM, pip-tools, ActiveState platform, homebrew, or your Linux / BSD distro's package manager? "One way to do it"? Nope, it's TIMTOWTDI.
the elephant in the room: semantic spaces...was an issue on day one...will be an issue the rest of its time