python use break in if statement