Message from Python discussions

December 2018

— But my approach is not correct, i am trying to figure out how to solve this formula


So i have the list of opens for example that is:
and closes that is:
For example, and i want to deploy this formula


— I tought at first that opens[-2] would do the trick but i need to do it recursively trough all the list

Message permanent page

— So i think i need an aditional forloop

— Use simple list comprehension

— Much easier to read and write

— Yes i've found solution using forloop


    hsopens=[(opens[i-1] + closes[i-1])/2 for i, x in enumerate(opens) if i > 0]

— A friend of other group helped

— Good

— I am now in another subject