to_21 = [x for x in range(1,22)]

odds = to_21[::2]

middle_third = [x for x in to_21 if (x > (len(to_21) / 3)) and ( x <= (len(to_21) * 2))]

the way I expected this to run was

middle_third = [x if x i to_21 is BOTH greater than 7 AND less than or equal to 14]

instead, it returned numbers greater than 7. Can someone please explain what is preventing my code from verifying both statements?