Write Python Code Directly In HTML Using PyScript

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:

<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:

PyScript Example Usage

Cheers๐Ÿป !!

Telegram Dev Channel ๐Ÿ’ฌ

Facebook Page ๐Ÿ‘


Twitter ๐Ÿฆ

Random Quote

We have two lives. The second one begins when we realise that we have only one

- Confucius

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

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