Is it possible to run python code in a web browser ? - Yes, It is now possible with the help of PyScript. Say thanks to this framework that allows users to create rich Python applications in the browser
There is no installation required. We can just use the PyScript assets served on https://pyscript.net/
Live Demo :
<html>
<head>
<link rel="stylesheet" href="https://pyscript.net/latest/pyscript.css" />
<script defer src="https://pyscript.net/latest/pyscript.js"></script>
</head>
<body> <py-script> print('Hello, World!') </py-script> </body>
</html>
Note (As per the current official documentation) :
PyScript is very alpha and under heavy development. There are many
known issues, from usability to loading times, and you should expect
things to change often. We encourage people to play and explore with
PyScript, but at this time we do not recommend using it for
production.
Djangoframework, but if you want to justprint()something to browser, it would be hard to do. Edit: you can ask new question and add errors that you get when trying Flask.Flask