list - python: comparing this row with next row -
C1
is a list of such lists:
C1 = [[1,2,3], [1,2,6], [7,8,6] for the row in C1:
I want to track What is the for example in the
line [0]
[<,> 2, 3]
and [1, 2, 6] ] There is no change in line [0]
However [1, 2, 6]
and [7, 8, 6]
line [0]
How do I make this change? I also want to know that
a line to keep track of the previous one Use <= p>
prev = none for the line in C1: if no previous is none and the previous! = Line [0]: # a change pre = line [0]
... just make sure you start the price (if anything in your lists, the first item Use an additional flag for) as one exists somewhere. If you want the first line to accept the change, change if
:
if it is not previous or first! = Line [0]:
Comments
Post a Comment