9951 explained code solutions for 126 technologies


python-redisSave entire list to Redis


r = redis.Redis()

list = [1, 2, 3]
r.rpush('lst', *list)ctrl + c
redis.Redis

connect to Redis server

list

sample list to save to Redis

rpush

push new element to the right side of the list

lst

name of the Redis key to save our local list to

*list

will pass all list elements to the rpush method