To redirect the user's browser back to your HTML menu page after the Python script finishes, you need to send an HTTP Location header or use an HTML meta-refresh tag within the Python script's output.
Since you are already using print commands in your Python script to output to the browser, you can add the necessary headers or tags to control the browser's behavior.
Method 1: Using the HTTP Location Header (Recommended)
This is the standard and most efficient way to perform a redirect. The key is that the Location: header must be printed before any other content, including the Content-Type header and the blank line.
In your Python script, replace your existing print statements with the following code at the very beginning of the script's output:
The AI reply also provided a bunch of links on implementations. So you should try asking google search yourself and and see what the response is from AI. The google AI is called Gemini 3 and it is one of the top rated AI systems available now.