LPOP
Since 1.1.0Lists
Syntax
LPOP key [count]Removes and returns the first element of the list at key. With count, removes and returns up to that many. A list left empty is deleted.
Reply
- The element, or
nilif the key does not exist. - With
count: an array of up tocountelements, ornilif the key does not exist.
Examples
> RPUSH l a b c
(integer) 3
> LPOP l
"a"
> LPOP l 5
1) "b"
2) "c"
> EXISTS l
(integer) 0