Linear Interpolation Using Python Dictionaries