Enable Javascript in your browser and then refresh this page, for a much enhanced experience.
First: compare number of elements equal to first element to length of elements array solution in Clear category for All the Same by leggewie
def all_the_same(elements) -> bool:
try:
return elements.count(elements[0]) == len(elements)
except IndexError:
return True
May 24, 2021