Is it possible to create dynamic variables

lets say i need a variable what is changing after period of time, by increasing in a number.

“variable = variable1” after a second it changes to “variable = variable2” .

Any idea how to make it change tht way?