Don't forget about the burden this would have put on python's language designers to take into account the large amounts of already running code in websites. JavaScript was and remains tailor-made for running in browsers, which has allowed it to maintain near-perfect backwards compatibility for its primary use case without killing the language itself. It's probably a good thing that no other language was repurposed for web page scripting, as it would likely have effectively forked that language.