Removes and returns up to count members with the highest scores in the sorted set stored at key.
redis.zadd("myset", {"a": 1, "b": 2, "c": 3}) assert redis.zpopmax("myset") == [("c", 3)]
The key of the sorted set
The number of members to pop
A list of tuples containing the popped members and their scores
Was this page helpful?