Python Hapus Item Tuple
Hapus Item Tuple
Catatan: Anda tidak dapat menghapus item dalam Tuple.
Tuple tidak dapat diubah , jadi Anda tidak dapat menghapus item darinya, tetapi Anda dapat menghapus Tuple sepenuhnya:
Contoh
Kata del
kunci dapat menghapus Tuple sepenuhnya:
thistuple = ("apple", "banana", "cherry")
del
thistuple
print(thistuple)
#this will raise an error because the tuple no longer exists