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

If you have good thoughts they will shine out of your face like sunbeams and you will always look lovely.

- Roald Dahl

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

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