How to implement linear interpolation? How to implement linear interpolation? python python