Arguments
str
required
The key of the set to move the member from.
str
required
The key of the set to move the member to.
str
The members to move
Response
True if the member was moved, False if it was not.Documentation Index
Fetch the complete documentation index at: /llms.txt
Use this file to discover all available pages before exploring further.
redis.sadd("src", "one", "two", "three")
redis.sadd("dest", "four")
assert redis.smove("src", "dest", "three") == True
assert redis.smembers("source") == {"one", "two"}
assert redis.smembers("destination") == {"three", "four"}
Move a member from one set to another
True if the member was moved, False if it was not.redis.sadd("src", "one", "two", "three")
redis.sadd("dest", "four")
assert redis.smove("src", "dest", "three") == True
assert redis.smembers("source") == {"one", "two"}
assert redis.smembers("destination") == {"three", "four"}
Was this page helpful?