I can use Redis.rpush('key', 1, 2, 3)
to push three elements to redis, but if there is a sequence:
seq = [1, 2, 3]
Redis.rpush('key', seq)
It will push a 'seq' element to redis but not the three number. Is there any way I can push the whole sequence to redis?
You can use this:
Redis.rpush('key', *seq)
More at SO.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With