Solving Ode Using Python Dictionaries Methods