variable_1 = "Dummy String"
variable_2 = "Dummy String"
variable_3 = "Dummy String"
for each in range(3):
variable_(each+1) = "Another Dummy String"
The above is incorrect syntax for a problem I am trying to solve.
The purpose of this code is to append the numbers 1-3, to the end of the variable name, before modifying the contents of the variable.
On the run through of the loop - for the value 0 - the value 0 + 1 (1) should be appended to 'variable_' yielding variable_1.
My question is: Is this something that is possible in Python? (Python 2.7.8 more specifically), and/or is there a more practical way to achieve a similar result?