python check if all elements in list are equal