python two if statements in a row