[Python] Why are sets ordered and not ordered at the same time in Python [duplicate]

Discussão em 'Python' iniciado por Stack, Agosto 8, 2025.

  1. Stack

    Stack Membro Participativo

    L=set()
    L.add("A")
    L.add("C")
    L.add("B")

    L
    Out[6]: {'A', 'B', 'C'}

    print(L)
    {'B', 'C', 'A'}


    EDIT : I'm using PyCharm and Python 3.10.2

    Continue reading...

Compartilhe esta Página