Enable Javascript in your browser and then refresh this page, for a much enhanced experience.
First solution in Clear category for Remove All After by kazuki.h
from typing import Iterable
def remove_all_after(items: list, border: int) -> Iterable:
return items[0: len(items) if not border in items else items.index(border) + 1]
April 13, 2021