Wondering how to host python codes online, that to even on websites, just by embedded code!
Your wait is over !
Below shows a sample code on doing, using python library, namely pyscript.
Code:
<head>
<link
rel="stylesheet"
href="https://pyscript.net/releases/2023.11.2/core.css"
/>
<script
type="module"
src="https://pyscript.net/releases/2023.11.2/core.js"
></script>
</head>
<body>
<script type="py"
terminal>
from pyscript
import display
display("Hello World!") # this goes to the DOM
#print("Hello terminal") # this goes to the terminal
</script>
</body>
wait no more try it on your website!
#happycoding
Comments
Post a Comment