[Python] How to turn a tuple of lists into a list?

Discussão em 'Python' iniciado por Stack, Setembro 26, 2024.

  1. Stack

    Stack Membro Participativo

    I am using Python 2.7 to turn a tuple of lists (of 2 elements) of float into a list of floats (([1.0],[2.0]) => [1.0,2.0]) like the following:

    [tuple_lists[0][0],tuple_lists[1][0]]


    Is there a pythonic 2.7 way to do so in a more elegant way?

    Continue reading...

Compartilhe esta Página