flip image horizontally python for loop