# Comprehensions with a filter over a list: the result has no more elements than the source
# has given so far, so each append is proved; also as a function's returned value
def positives(xs: list[int]) -> list[int]:
    return [x for x in xs if x > 0]


def labels(xs: list[int]) -> list[str]:
    out: list[str] = [str(x) for x in xs if x % 2 == 1]
    return out


def main() -> None:
    xs: list[int] = [1, -2, 3, 4, -5]
    ps: list[int] = positives(xs)
    for e in ps:
        print(e)
    ls: list[str] = labels(xs)
    for s in ls:
        print(s)
    words: list[str] = ["a", "bb", "ccc"]
    long: list[str] = [w for w in words if len(w) > 1]
    print(len(long), len(positives(ps)))


if __name__ == "__main__":
    main()
