Enable Javascript in your browser and then refresh this page, for a much enhanced experience.
all, starmap, eq, zip solution in Clear category for All the Same by flpo
from operator import eq
from itertools import starmap
def all_the_same(elements):
return all(starmap(eq, zip(elements, elements[1:])))
Jan. 29, 2018