dictionary - confuse with saving between previous value and current in python -


i new in python, try make simple python script save fluctuative value between previous value , current value. confuse that..

let that, fluctuative value position

previous_value = position

current_value = position

how make previous value saved before next position value ??

previous_value,current_value = none,none  #initialize values outside loop  loop ... :   previous_value = current_value   #storing last current value previous value   current_value = position         #storing current position current value. 

Comments

Popular posts from this blog

Why does Ruby on Rails generate add a blank line to the end of a file? -

keyboard - Smiles and long press feature in Android -

node.js - Bad Request - node js ajax post -