Set

SINTER

Return the intersection between sets and store the resulting set in a key

Arguments

destinationbodystrrequired

The key of the set to store the resulting set in.

keysbody*List[str]required

The keys of the sets to perform the intersection operation on.

Response

intrequired

The number of elements in the resulting set.

Example
redis.sadd("set1", "a", "b", "c"); redis.sadd("set2", "c", "d", "e"); assert redis.sinter("destination", "set1", "set2") == 1
Loading search…