Hello Perhaps this would suffice:
prev = None
for value in main_call():
if value==prev:
pass
else:
prev = value
if prev>0:
print('+v')
elif prev<0:
print('-v')
else:
print('0')
Of course this will work only if subsequent values are exactly the same.
If not - then "value==prev" should be replaced by some other test (for sign or
for proximity).
Regards
Andrzej Brozi
--
https://mail.python.org/mailman/listinfo/python-list
