It took more than a decade. They basically built out the features and waited until their competitors made some strategic mistake, of which they made several in that decade.
It was pretty much the same with Netscape and MSIE. That monopoly misuse probably helped, but Netscape also seemed bent on killing itself. Despite the mismanagement, it still took almost five years.
Perl was more popular than Python for more than a decade. Having much of the early web developed on it didn't help in the long run. First mover advantage might be a thing, but it never wins in the long run. And in the long run, ten years is nothing.