RPOP
Since 1.1.0Lists
Syntax
RPOP key [count]Removes and returns the last element of the list at key. With count, removes and returns up to that many, last first. 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
> RPOP l
"c"
> RPOP l 5
1) "b"
2) "a"