[Python] How can I parse a list result?

Discussão em 'Python' iniciado por Stack, Janeiro 28, 2025.

  1. Stack

    Stack Membro Participativo

    I am storing a list in Redis:

    redis.lpush('foo', [1,2,3,4,5,6,7,8,9])


    I get the list back like this:

    redis.lrange('foo', 0, -1)


    And I get this:

    [b'[1, 2, 3, 4, 5, 6, 7, 8, 9]']


    How can I convert this to an actual Python list? I don't see anything defined in RESPONSE_CALLBACKS that can help.

    Continue reading...

Compartilhe esta Página