Sorted Set
ZDIFFSTORE
Writes the difference between sets to a new key.
Arguments
destinationbodystrrequired
The key to write the difference to.
keysbodyList[str]required
The keys to compare.
Response
int
The number of elements in the resulting set.
Example
redis.zadd("key1", {"a": 1, "b": 2, "c": 3})redis.zadd("key2", {"c": 3, "d": 4, "e": 5})# a and bassert redis.zdiffstore("dest", ["key1", "key2"]) == 2