Write Python Code Directly In HTML Using PyScript

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:

    <link rel="stylesheet" href="https://pyscript.net/alpha/pyscript.css" />
    <script defer src="https://pyscript.net/alpha/pyscript.js"></script>

and you are good to go 🚀

Below is the example usage of PyScript with output:

PyScript Example Usage

Cheers🍻 !!

Subscribe To Get Instant Updates On Release Of New Blogs And Courses

We Respect Your Privacy. Your Email Will Never Be Shared.