break for loop in if statement python