match_arg

match_arg(arg, choices)

Match an argument to an existing set of possible values

Args: arg: a string choices (List[str]): a List with strings

Returns: an ordered list of unique elements in x

Examples: >>> from rlike import * >>> match_arg(‘y’, [‘x’, ‘y’, ‘z’]) ‘y’