[Python] How can I compare two lists in python and return not matches

Discussão em 'Python' iniciado por Stack, Fevereiro 6, 2025.

  1. Stack

    Stack Membro Participativo

    I would like to return values from both lists that not in the other one:

    bar = [ 1,2,3,4,5 ]
    foo = [ 1,2,3,6 ]

    returnNotMatches( a,b )


    would return

    [[ 4,5 ],[ 6 ]]

    Continue reading...

Compartilhe esta Página