[Python] Is there any way to sort a set without using sorted function? [duplicate]

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

  1. Stack

    Stack Membro Participativo

    I have the set

    set = {"cherry", "banana", "apple"}


    and with two lines of code I want the set sorted without using sorted() (because sorted() changes the set to a list).

    Continue reading...

Compartilhe esta Página