Enable Javascript in your browser and then refresh this page, for a much enhanced experience.
Simple solution in Clear category for Group Equal consecutive by genadiik
def group_equal(data):
if not data:
return []
result = [[data[0]]]
for i in data[1:]:
if i == result[-1][0]:
result[-1].append(i)
else:
result.append([i])
return result
Aug. 10, 2019
Comments: