I want to use on my website an information / value that will be calculated in the python file. So the user will give some information, this data will be sent to my python file, where the result will be calculated and returned, then forwarded to my website. How can I do this?
Ideally, you would have a backend that is made in python. This backend can then use a library like flask to handle the requests. Once you have that up, from the frontend, you will use the fetch function to communicate with that server you made previously. Fetch lets you both send data and return data, which looks like what you are heading towards.