How To Take Derivative In Python