python if statement break for loop