| layout | api-command | ||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
| language | Python | ||||||||||
| permalink | api/python/set_intersection/ | ||||||||||
| command | set_intersection | ||||||||||
| related_commands |
|
{% apibody %} array.set_intersection(array) → array {% endapibody %}
Intersect two arrays returning values that occur in both of them as a set (an array with distinct values).
Example: Check which pieces of equipment Iron Man has from a fixed list.
r.table('marvel').get('IronMan')['equipment'].set_intersection(['newBoots', 'arc_reactor']).run(conn)