Enable Javascript in your browser and then refresh this page, for a much enhanced experience.
No import solution in Clear category for Group Equal consecutive by OrginalS
def group_equal(els):
res = []
try:
tmp = [els[0]]
except IndexError:
return []
for elm in els[1:]+[None]:
if elm == tmp[0]:
tmp.append(elm)
else:
res.append(tmp)
tmp = [elm]
return res
Oct. 6, 2019
Comments: