Help me in solving PYTH106 problem

My issue

how to print the number which is not 30 or 31

My code

# Find the anomaly month in the list below
days = [30, 31, 30, 30, 31, 30, 20, 30, 31, 30, 31, 30]
for number in days:
    if number != 30 or number !=31:
        break
    print(number)

Learning course: Python with Data structures
Problem Link: CodeChef: Practical coding for everyone

Hi, You are on the correct path; just use the print statement inside that if block and use and to compare both conditions.

days = [30, 31, 30, 30, 31, 30, 20, 30, 31, 30, 31, 30]
for number in days:
    if number != 30 and number !=31:
        print(number)

thankyou dsilu