intersect

intersect(x, y)

Performs intersection on two lists

Parameters

Name Type Description Default
x List a List with atomic elements required
y List a List with atomic elements required

Returns

Name Type Description
List a list with unique elements in x which are as well in y

Examples

>>> from rlike import *
>>> x = [1, 2, 3, 3]
>>> y = [3, 4, 6]
>>> intersect(x, y)    
[3]