Numerical Method Using Python Dictionaries