In Python, I want to be able to create a new variable with a name close to another one in a loop at a certain runtime event an example
for i in range (100):
###create a variable called var"i" = i
so after running the loop i would have a 100 new variables where
var1 = 1
var2 = 2
var3 = 3
...
or maybe at certain event (lets say maybe a button pushed) a NEW string containing some info (say the contents of a QLineEdit text box) called stringX so it doesn't overwrite the previous one
I searched around a little bit found "exec" but I would like some more explanation and to see if there is a way to do it without using "exec"