Embed Python in an HTML page
Try trinket.io! Trinket lets you embed, share and save python code for free!
I'm trying to look for a way to embed Python code inside an HTML page.
I'm NOT talking about using Python as the back-end with tools like Django or Flask. I would like to implement a very very basic console on my webpage so that I can show off Python scripts running, not just pure code. The user would then be able to modify the python, then re-run it to see changes.
Suppose I'm making a python programming tutorial website, and I want the user to see that print("hello world"), when run, output "hello world".
Is there a way to achieve this?