Store data in the list advanced (left-forward)
Lpush names A B C D E
Store Data LIFO (right-forward) in the list
Rpush names G P H K
To view the data in the list:
Lrange names 0 (starting from 0)-1
Slice:
Lrange names start end (start end stands for starting and ending positions)
Insert:
Linsert names Before/after D (where the benchmark is plugged in) TEST
Modify:
LSet Names 3 Xiaopang
Delete:
Lrem Name 3 Xiaopang
To remove from the left side of the list:
Lpop names
In addition to subscript 1-2 other data is removed:
LTRIM names 1 2 (subscript position)
Names the last data, insert the first position into the Names2:
Rpoplpush names Names2
To delete list data:
Blpop names 4 (no data will wait 4 seconds, the data will be displayed, waiting for the time can continue to put data)
Put the last data in the names in the first position of the Names2:
Brpoplpush names Names2 40
Python-redis list mode