Help with python

I need help with on of the function to calculate cycle Python.
Code:
> for Elem in ElemList:

        print("Processing...")
        ElemTurn = int(Elem.get('turn'))
        ElemTime = int(Elem.get('time'))
        a = ElemTime

        print('Turn', ElemTurn)
        print('Time', ElemTime)

output:
Turn 1
Time 446500
Processing…
Turn 2
Time 446507
Processing…
Turn 3
Time 446510

Process finished with exit code 0

How for example can I calculate time from Turn 2 minus time from Turn 1, then time from Turn 3 minus time Turn 2, then time from Turn 4 minus time from Turn 3 etc and how to output it?

If you would do it on paper, you would look back to the previous turn to find the time. We cannot do that in a program, but we can of course remember the previous time, e.g. in a field “previous_elemtime”.

If you do that, the time difference becomes easy to calculate, but you do need to do something special on the first turn. There is no previous_elemtime at that moment, you need to single that case out.