What's new in Valkey 9.0? Discover new features and improvements. Read the announcement.
LPOP
Returns and removes one or more elements from the beginning of a list. Deletes the list if the last element was popped.
Usage
LPOP key [count]
Complexity
O(N) where N is the number of elements returned
Since
1.0.0
ACL Categories
@fast, @list, @write
Command flags
WRITE, FAST
By default, the command pops a single element from the beginning of the list.
When provided with the optional count argument, the reply will consist of up
to count elements, depending on the list's length.
Deletes the list if the last element was popped.