Q: How to print value from a function after a text in html I am having below html code
<!DOCTYPE html>
<html>
<body>

<p>Voltage. <input type="submit"> </p>
<p>This is a paragraph.</p>

</body>
</html>

In this code, for the first line I am appending a submit button after a text. My requirement is that instead of submit button, i want some value that I wil retreive from a function. 
Say I am having a function say voltage. It is constantly updating value in it. Every time when I open this html page, I want to print the voltage value after first line. How I can do that
I am using this code in Python flask

A: To change the value every time the value on the backend is updated you will need an event-based workflow. Since this might (!) be very complex at the first try i recommend you to create a PHP backend or similar to publish the result of the 'voltage' function. Afterwards you create a Ajax Call on the frontend side to this PHP page and set an interval to 0.5 or 1s depending on how often the value will change. The call for the interval is 

setInterval( ajaxfunctionCallHere, timeoutDurationInMS)

