I have recently undertook converting all of my older batch files towards running on Python 3.6 to allow for them to run on multiple OS's. During this process I have hit a wall, my question is how to best convert these following batch commands to something capable of being run in Python. I have looked around extensively and it has all been for naught. I am open to suggestions.
set number=1
set var%number%=[some value here]
I have already tried things similar to this in Python:
number = 1
("var"+str(number)) = [some value here]
As well as this to try to get the interpreter to process the variable I'm going to assign to done before I attempt assignment.
number = 1
var = ("var"+str(number))
(var) = [some value here]
The reason why I am trying to convert the first method is so that the program could initially set a changing value to 'var1' then 'var2' then 'var3' etc. Is this one of those things that is unique to batch files and not languages such as Python?