Anything short of a big AI winter is not going to move Python from its top spot. As Python has become the first choice of output code for LLMs its dominance is only going to grow.
Is Python really the first choice of output code? I'm not saying you're wrong, I just don't know the answer and I don't know where to look to find out.
I would have assumed it might be JS and more specifically React -- isn't that what you often get if you ask an LLM to "make an app that does such-and-such"?
(Experimental anecdata: I just asked Gemini to write an app and it gave me a single HTML file with embedded JS, no TS or React, Tailwind for CSS.)
(Edit to add: then I asked it to "write some code" instead of "write an app", and this time it went with Python.)
Ime, unless you steer it otherwise, they will default toward TS/JS almost exclusively. Probably Python though if for some reason they decided not to use TS/JS.
Again you're making unsupported assertions ("trained most on Python code") and coming to unsupported conclusions ("they seem to prefer it") -- my own very quick experiment shows that it depends on how you ask ("app" versus "code") at the very least.
The choices of JS and Python were pretty solid for the prompts I gave. Maybe the LLM is, well, making a reasonable decision in context, rather than just defaulting to Python!
"LLMs prefer Python" is an over-simplification. Python was already very popular, so I agree that LLMs are likely to entrench that popularity, but that doesn't mean Python will grow into other areas where it wasn't being used much before.
Why are you verbosely repeating my own replies? You asked why, I told you a theory that MAYBE because they were trained on Python code. You do know that's how a LLM or even a simple neural network works right?
Of course it is an over-simplification. Should I do an empirical scientific study before I can reply that MAYBE LLMs seem to prefer Python? I was talking from my own personal experience.
Are you using a LLM to write your replies? Because they seem very odd to me.