def list_state(input_list):
check0 = lambda prev, now: 0 if now <= 1.5 * prev and now >= prev else None
check1 = lambda prev, nov: 1 if now >= 1.5 * prev else None
check2 = lambda prev, now: 2 if now * 1.5 >= prev and now < prev else None
check3 = lambda prev, now: 3 if now * 1.5 < prev else None
output = [None]
for index in range(len(input_list)):
if index > len(input_list)-2:
break
prev, now = input_list[index], input_list[index+1]
for condition in (check0, check1, check2, check3):
result = condition(prev, now)
if result is not None:
output.append(result)
break
return output
a = [200, 320, 405, 460]
print(list_state(a))
# [None, 1, 0, 0]
a = [200, 149, 98, 44]
print(list_state(a))
# [None, 2, 3, 3]
tickers = {'BTC': [200, 149, 98, 44], 'ETH': [200, 320, 405, 460]}
tickers_state = {}
for key, data_list in tickers.items():
tickers_state[key] = list_state(data_list)
print(tickers_state)
# {'BTC': [None, 2, 3, 3], 'ETH': [None, 1, 0, 0]}