how to change index value in for loop python