Enable Javascript in your browser and then refresh this page, for a much enhanced experience.
itertools solution in Clear category for Compress List by juestr
from itertools import groupby
from typing import Iterable
def compress(items: list) -> Iterable:
return (x for x, _ in groupby(items))
Jan. 30, 2020
Comments: