redis.sadd("myset", "one", "two", "three")

assert redis.srandmember("myset") in {"one", "two", "three"}

Arguments

key
str
required

The key of the set.

count
number
default: 1

How many members to return.

Response

The random member. If count is specified, an array of members is returned.