I started programming around 2007. I actually wanted to get into Common Lisp, because I was heavily influenced by Paul Graham, HN and early Reddit. I did try a couple of web frameworks with Common Lisp, but didn't get very far.
Ruby on Rails was very big at the time, but I ended up choosing Python for a couple reasons. Python was a bit older, it already had a reputation as a scripting language for system administration. It had more libraries like Numpy and seemed like you could do more things with Python. You could script, write desktop apps, use it for data science, while Ruby was pretty much just for web dev.
Even back then there was a huge ecosystem of Python package and it seemed like anything you wanted to do with Python, there was already a decent library available for it. So it seemed like you had more options learning Python. Django was also just coming out at the time, so you could do web dev with Python too. Then Reddit rewrote their site and switched from Common Lisp to Python, so that seemed like a good endorsement too.
Python became as big as it has because Machine Learning / AI exploded and Python was there to benefit from that. Numpy / Pandas / Jupyter Notebooks etc. gave everyone who wanted to learn ML/AI FREE tools that were as good or better than Matlab / Mathematica / SPSS or other software that cost thousands of dollars. Grad students are poor. Maybe their school has a Matlab license they can use, but they probably can't install it on their personal laptop, so they used Python instead, wrote all of the influential papers about ML using Python, then anyone else who wanted to learn from that installed Python and so it goes.