Redis Lists: RPOP
RPOP key
Redis RPOP command is used to remove and returns the last element of the list stored at key.
Syntax:
RPOP KEY_NAME
Available since
1.0.0.
Return Value
String reply, the value of the last element, or nil when a key does not exist.
Return Value Type
String
Example: Redis RPOP
127.0.0.1:6379> LPUSH mycolor1 white black red blue (integer) 4 127.0.0.1:6379> LRANGE mycolor1 0 -1 1) "blue" 2) "red" 3) "black" 4) "white" 127.0.0.1:6379> RPOP mycolor1 "white" 127.0.0.1:6379> LRANGE mycolor1 0 -1 1) "blue" 2) "red" 3) "black" 127.0.0.1:6379> RPOP mycolor1 "black" 127.0.0.1:6379> LPOP mycolor1 "blue"
Previous:
LTRIM
Next:
RPOPLPUSH
- New Content published on w3resource:
- HTML-CSS Practical: Exercises, Practice, Solution
- Java Regular Expression: Exercises, Practice, Solution
- Scala Programming Exercises, Practice, Solution
- Python Itertools exercises
- Python Numpy exercises
- Python GeoPy Package exercises
- Python Pandas exercises
- Python nltk exercises
- Python BeautifulSoup exercises
- Form Template
- Composer - PHP Package Manager
- PHPUnit - PHP Testing
- Laravel - PHP Framework
- Angular - JavaScript Framework
- Vue - JavaScript Framework
- Jest - JavaScript Testing Framework