[Python] Collection of strings as python dict key [duplicate]

Discussão em 'Python' iniciado por Stack, Julho 31, 2025.

  1. Stack

    Stack Membro Participativo

    I would like to use some strings

    "A", "B", ...

    as a single key for a python dict, but I don't care the order of those string: "A", "B", "C", should be considered the same as "B", "A", "C".

    I tryed set(["A", "B", "C"]) but this is un-hashable.

    Continue reading...

Compartilhe esta Página