Remove the first count occurrences of an element from a list.
count
redis.rpush("mylist", "one", "two", "three", "two", "one") assert redis.lrem("mylist", 2, "two") == 2 assert redis.lrange("mylist", 0, -1) == ["one", "three", "one"]
The key of the list.
How many occurrences of the element to remove.
The element to remove
The number of elements removed.
Was this page helpful?