Enable Javascript in your browser and then refresh this page, for a much enhanced experience.
First solution in Clear category for Compress List by wbl4126
from typing import Iterable
def compress(items: list) -> Iterable:
return [items[i] for i in range(len(items)) if i == len(items)-1 or items[i] != items[i+1]]
April 15, 2020