+ 1

How to add python code in HTML

I tried <py-script><\py-script> but it does not work It should be able to print

15th May 2025, 12:00 PM
Mikhael
Mikhael - avatar
3 Antworten
+ 4
Mikhael Here is another way on how can you use python in web i.e brython: https://sololearn.com/compiler-playground/WjOMdoqYBR2q/?ref=app
15th May 2025, 3:23 PM
Gulshan Mahawar
Gulshan Mahawar - avatar
+ 3
You mean as just plain text or maybe syntax highlighting, or do you mean executable code?
15th May 2025, 12:06 PM
Afnan Irtesum Chowdhury
Afnan Irtesum Chowdhury - avatar
+ 3
To run Python in HTML, use PyScript, but you must include the PyScript library first for eg:- https://sololearn.com/compiler-playground/WNG84XHfO0A3/?ref=app
15th May 2025, 2:47 PM
Alhaaz
Alhaaz - avatar