Pythonのタプルアイテムの削除
タプルアイテムを削除する
注:タプル内のアイテムを削除することはできません。
タプルは変更できないため、アイテムを削除することはできませんが、タプルを完全に削除することはできます。
例
del
キーワードはタプルを完全に削除できます。
thistuple = ("apple", "banana", "cherry")
del
thistuple
print(thistuple)
#this will raise an error because the tuple no longer exists