Enable Javascript in your browser and then refresh this page, for a much enhanced experience.
I tried to use str.partition() but failed... solution in Clear category for Remove All After by tokyoamado
from typing import Iterable
def remove_all_after(items: list, border: int) -> Iterable:
for n in items:
yield n
if n == border:
break
Jan. 27, 2020