break for loop after if condition python