How To Write Derivative In Python