import itertools


def combinations(iterable: list) -> list:
    """combinations([1,2,3]) --> (1,) (2,) (3,) (1,2) (1,3) (2,3) (1,2,3)"""
    return list(
        itertools.chain.from_iterable(
            itertools.combinations(iterable, r) for r in range(1, len(iterable) + 1)
        )
    )