I want to iterate over 2 lists, and compare elements from the same list to see if higher or lower. something like
high = [5,7,8,4,2 ... 3] low = [16,4,8,1,48 ... 4]
if number in high > than previous number, add it to the high_list if number in low < previous number, add it to the low_list
output would be
high_list = [5,7,8] low_list = [16,4,1]
def iter_num (high,low):
some_listH = []
some_listL = []
for H,L in zip(high,low):
x = H +1
if H > H[x]:
H = H[x]
some_listH.append(H)
if L < L[x]:
L = L[x]
some_listL.append(L)
return some_listH, some_listL