Arguments
str
required
The key to write the difference to.
List[str]
required
The keys to compare.
Response
The number of elements in the resulting set.
Documentation Index
Fetch the complete documentation index at: /llms.txt
Use this file to discover all available pages before exploring further.
redis.zadd("key1", {"a": 1, "b": 2, "c": 3})
redis.zadd("key2", {"c": 3, "d": 4, "e": 5})
# a and b
assert redis.zdiffstore("dest", ["key1", "key2"]) == 2
Writes the difference between sets to a new key.
redis.zadd("key1", {"a": 1, "b": 2, "c": 3})
redis.zadd("key2", {"c": 3, "d": 4, "e": 5})
# a and b
assert redis.zdiffstore("dest", ["key1", "key2"]) == 2
Was this page helpful?