python break out of for loop with if