Question: how to change the name of a variable in a loop python?
Answer: No you cannot. You can generate a new variable in each iteration with the same name. It is possible because the scope of the variable would be new for every single iteration.