<!DOCTYPE html>
<head>
<link rel="stylesheet" href="https://pyscript.net/alpha/pyscript.css" />
<script defer src="https://pyscript.net/alpha/pyscript.js"></script>
</head>
<body>
<py-script>
print("Hello World")
</py-script>
</body>
</html>
Option 1: Use a Python library such as Django or Flask
Option 2: Run Python through by embedding PHP into HTML
<?PHP
echo shell_exec("python main.py");
?>