match

match(x, table)

Looks up x in table and returns the positions where it has found x

Args: x (List[Hashable]): a List with Hashable elements table (List[Hashable]): a List with Hashable elements

Returns: a list with positions where it found x in table

Examples: >>> from rlike import * >>> x = [1, 2, 4, 3, 3] >>> y = [3, 4, 6] >>> match(x, y) [None, None, 1, 0, 0] >>> match(y, x) [3, 2, None]