Lists Lpop
# Redis Lpop Command
[!(#) Redis Lists](#)
The Redis Lpop command removes and returns the first element of a list.
### Syntax
The basic syntax of the Redis Lpop command is as follows:
redis 127.0.0.1:6379> Lpop KEY_NAME
### Available Versions
>= 1.0.0
### Return Value
The first element of the list. Returns nil when the list key does not exist.
### Example
redis 127.0.0.1:6379> RPUSH list1 "foo"(integer) 1 redis 127.0.0.1:6379> RPUSH list1 "bar"(integer) 2 redis 127.0.0.1:6379> LPOP list1 "foo"
[!(#) Redis Lists](#)
YouTip