python check if all elements in list are equal to value