Refactored nested loop into nested list-comprehension in dictionary_spline.