def strip_head ( sequence , values ) : values = set ( values ) return list ( itertools . dropwhile ( lambda x : x in values , sequence ) )
trim head from list python
Strips elements of values from the beginning of sequence .
def strip_head(sequence, values):
    """Strips elements of `values` from the beginning of `sequence`."""
    values = set(values)
    return list(itertools.dropwhile(lambda x: x in values, sequence))