Enable Javascript in your browser and then refresh this page, for a much enhanced experience.
First solution in Clear category for Group Equal consecutive by Moff
def group_equal(els):
result = []
pred = None
for el in els:
if el == pred:
result[-1].append(el)
else:
result.append([el])
pred = el
return result
Dec. 6, 2018
Comments: