If you’re using a <py-script> tag, you can use the src attribute to reference a URL where the relevant python code is located. In this case, any code written within the tag itself (that is, in the HTML page) is ignored. For example:
<py-script src="some/url/with/code.py"></py-script>
Note that the attribute is a URL, not a local file path, so you’ll likely want to use a small server program to make the python file available on the network. Running python -m http.server from the command line will do.
How to run html code in python with web output using vscode - Stack Overflow
How to link Python code with HTML webpage? - Stack Overflow
Visual Studio Code from Python to HTML - HTML/CSS - Code with Mosh Forum
How do I run Python Script from VsCode in my Browser?
So with an HTML File, I can just rightclick it and select "Open with Live Server" and I can view it on my Browser. So how exactly do I do that with Python? Because when I right click my Python file it doesnt say that
Edit: I use Flask. Problem is I still dont know how to connect it to my Browser