Do you want to write python code directly in HTML? Well, you can do that with PyScript.
How you ask? Just add these two lines inside the <head>
tag of your HTML file like this:
<html>
<head>
<link rel="stylesheet" href="https://pyscript.net/alpha/pyscript.css" />
<script defer src="https://pyscript.net/alpha/pyscript.js"></script>
</head>
</html>
and you are good to go 🚀
Below is the example usage of PyScript with output:
Cheers🍻 !!