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