JSFiddle - React, Tailwind, and code Playground
HTML
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Title</title>
<!-- BRYTHON -->
<script src="https://cdnjs.cloudflare.com/ajax/libs/brython/3.8.8/brython.js" integrity="sha256-rA89wPrTJJQFWJaZveKW8jpdmC3t5F9rRkPyBjz8G04=" crossorigin="anonymous"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/brython/3.8.8/brython_stdlib.js" integrity="sha256-Gnrw9tIjrsXcZSCh/wos5Jrpn0bNVNFJuNJI9d71TDs=" crossorigin="anonymous"></script>
</head>
<body onload="brython()">
<div class="container">
<h2 id="hello"></h2>
<button id="alert-btn">Insert</button>
<input type="text" id="text" placeholder="Enter something">
<span id="output"></span>
</div>
<!-- Text bind -->
<script type="text/python" id="script1">
from browser import document
def show_text(e):
document['output'].textContent = e.target.value;
document['text'].bind('input', show_text)
</script>
</body>
</html>