lpop

LPOP

LPOP key

Removes and returns the first element of the list stored at key.

Return value

Bulk string reply: the value of the first element, or nil when key does not exist.

Examples

redis> RPUSH mylist "one" (integer) 1 redis> RPUSH mylist "two" (integer) 2 redis> RPUSH mylist "three" (integer) 3 redis> LPOP mylist "one" redis> LRANGE mylist 0 -1 1) "two" 2) "three"

© 2009–2017 Salvatore Sanfilippo
Licensed under the Creative Commons Attribution-ShareAlike License 4.0.
https://redis.io/commands/lpop

在线笔记
App下载
App下载

扫描二维码

下载编程狮App

公众号
微信公众号

编程狮公众号

意见反馈
返回顶部