Interaction between html and python

How to create a button which on click should receive an input from the user and that input should be saved in a variable in python.


SIMILAR TO THIS IMAGE.

Solution of this problem is
variable_name = input()

No.Input() is used for getting input for python only.I want to interact the input for html with python

you can use something like this

and add that value to a variable in python.

You can refer this topic on w3schools.

Hope that helps