How about this:
>>> def check(matrix):
... # flatten up the matrix into one single list
... # and set on the list it should be [0,1] if it
... # contains only 0 and 1. Then do sum on that will
... # return 1
... if sum(set(sum(matrix,[]))) > 1:
... return False
... return True
...
>>>
>>> check([[1,0,1], [1,1,0], [0,0,0]])
True
>>> check([[1,0,1], [1,1,0], [0,0,2]])
False
>>> check([[1,0,1], [1,1,0], [0,0,3]])
False
>>>