Here is the Lagrange interpolating polynomial equation:
You can find a python code hosted in GitHub here: https://github.com/Eddy-Barraud/Lagrange-interpolating-polynomials
It calculates the polynomial that passes through points given interactively.
And it plots a graph like these ones :
Code :