Enable Javascript in your browser and then refresh this page, for a much enhanced experience.
groupby and repeat solution in Clear category for Group Equal consecutive by tokyoamado
from itertools import groupby, repeat
def group_equal(els):
return [list(repeat(x[0], len(list(x[1])))) for x in groupby(els)]
April 17, 2019