Virtually all that ML done with python is done in optimized c/c++/Cuda libraries. There isn't that much time spent in python.
It's interesting that the author doesn't take the high road and mention things like this, Bitcoin mining, streaming video games (not entirely sure if the carbon footprint of that is bigger than downloading and executing a game locally tbh) as more effective ways to reduce emissions.