python break out of for loop if condition