Python Usuń elementy krotki
Usuń elementy krotki
Uwaga: Nie można usuwać elementów w krotce.
Krotki są niezmienne , więc nie możesz usunąć z nich elementów, ale możesz całkowicie usunąć krotkę:
Przykład
Słowo del
kluczowe może całkowicie usunąć krotkę:
thistuple = ("apple", "banana", "cherry")
del
thistuple
print(thistuple)
#this will raise an error because the tuple no longer exists