Question: how to change variable name in 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. That will serve the same purpose for what you want.