[Python] Why can tuples contain mutable items?

Discussão em 'Python' iniciado por Stack, Abril 3, 2025.

  1. Stack

    Stack Membro Participativo

    If a tuple is immutable then why can it contain mutable items?

    It is seemingly a contradiction that when a mutable item such as a list does get modified, the tuple it belongs to maintains being immutable.

    Continue reading...

Compartilhe esta Página