代码 from sympy import * import math from matplotlib import pyplot as plt def lagrange(x, y): p, la = symbols('p la') n = len(x