Return successive entries from an iterable as long as the predicate evaluates to true for each entry.
itertools/takewhile
takewhile