assert redis.rpushx("mylist", "one", "two", "three") == 3 assert lrange("mylist", 0, -1) == ["one", "two", "three"] # Non existing key assert redis.rpushx("non-existent-list", "one") == 0
Push an element at the end of the list only if the list exists.
0
Was this page helpful?