Way back when I wrote a blog post about why we're using Python in this book. I still think it's a good choice, with weighty advantages over Java or Rust or JavaScript or any number of other languages we might have chosen. But one thing I've always regretted a bit about choosing Python is that there was no way to incorporate the code into the book itself, since there isn't a great way to run Python in the browser. This became especially painful when Chris and I started working on
Couldn't you just host your examples on https://repl.it where you could run / edit the examples in the browser without having to transpile them to JS?