Q:

Python:Find if all elements in lists are the same except exactly 2 numbers

I wonder how to check if two lists of numbers are the same except exactly 2 numbers
if list1 == list2: # + except 2 numbers

A:

If order of list elements is important, you can use something like this:
if sum(i != j for i, j in zip(list1, list2)) == 2:
    # the two lists are equal except two elements

If order is not important, and repeated elements do not matter, you could also use set intersection (&) and compare length:
if len(set(list1) & set(list2)) == len(list1) - 2:
    # the two list are equal except two elements

If order is not important, but repeated elements matter, use the same approach, but with collections.Counter:
from collections import Counter
if len(Counter(list1) & Counter(list2)) == len(list1) - 2:
    # the two list are equal except two elements

