Set

SUNION

Return the union between sets

Arguments

keysbody*List[str]required

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

Response

set[str]required

The resulting set

Example
redis.sadd("key1", "a", "b", "c")redis.sadd("key2", "c", "d", "e")assert redis.sunion("key1", "key2") == {"a", "b", "c", "d", "e"}
Loading search…