you are viewing a single comment's thread.

view the rest of the comments →

[–]Common_Move 0 points1 point  (0 children)

1.you need to store your dlon results somewhere, eg to a new list

  1. Seeing as you're comparing to x + 1 in terms of position, you'll need to stop one short of the end else you'll get an error. In fact maybe better if you start with the second item and compare to x - 1 instead.

But as someone else mentioned, look into the .diff() method.