Removes and returns the first element of the list stored at key
.
返回值
Bulk string reply: the value of the first element, or nil
when key
does not exist.
例子
redis>
RPUSH mylist "one"
(integer) 1redis> RPUSH mylist "two"
(integer) 2redis> RPUSH mylist "three"
(integer) 3redis> LPOP mylist
"one"redis> LRANGE mylist 0 -1
1) "two" 2) "three"