Need Python Example: sort rows, subtract current from next, load in new field

Discussion created by nlepsky on Apr 21, 2011
Latest reply on Jun 14, 2012 by amts88
Please help! I am new to Python.

I created a model in ModelBuilder. The last steps are to grab the attribute table of the feature class, sort MEAS column in ascending order and then subtract next value from current and load those values in the new field. (I have an empty field in the attribute table).

I wrote a simple script, but all I could do is to sort the MEAS column and print values out.
Could anybody be so kind and get me an example code?....